Code Monkey home page Code Monkey logo

Comments (3)

daltonfury42 avatar daltonfury42 commented on September 2, 2024

Yes, we can do that.

I would prefer extracting the logic to a member function out_of_vocabulary_handler and adding instructions to the readme on how users can override it with their own custom implementation.

What do you think?

from truecase.

keshprad avatar keshprad commented on September 2, 2024

Yes, that's good. I'll work up an implementation.

In addition to out_of_vocabulary, an out_of_dictionary option could also be useful in a later update. This could be an early-stage way to differentiate between names and words that are simply not in the vocabulary

For example:
"hip-hop" is not in vocabulary, but is certainly a word. I would want it in lowercase.

However, my name (Keshav) is not in the vocabulary and won't be found in a dictionary. I'd want to capitalize "Keshav."

This certainly won't work for all names, as some names are words in the dictionary. eg: "Trump"

from truecase.

keshprad avatar keshprad commented on September 2, 2024

Another thing to consider:
If the first word is classified as "out_of_vocabulary", then should we capitalize it, or just go along with the user's out_of_vocabulary_token_option.

Currently, it is the latter; however, I think we should capitalize it.

from truecase.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.