spencermountain / compromise

modest natural-language processing
http://compromise.cool
MIT License
11.43k stars 656 forks source link

[Improvements]: Add .toLowerCase() API to various functions. #1094

Open MarketingPip opened 7 months ago

MarketingPip commented 7 months ago

Just doing some playing.... Some functions are missing proper API usage. (or have not been added)

prepositions()
conjunctions()
prepositions()

Are all currently required to be used like example:

     doc
        .match("#Determiner")
        .out("text")
        .toLowerCase()
       doc
        .prepositions()
        .out("text")
        .toLowerCase()
    doc
        .conjunctions()
        .out("text")
        .toLowerCase()

vs standard API usage...

   doc
        .adjectives()
        .toTitleCase()

As well .determiners() might be a nice to have handy & I am sure there are a few others that can be added.

spencermountain commented 7 months ago

hey sure! good idea. Feel free to make a PR for them - I can help add the types and docs for them, if you'd like cheers!