Releases: TotalVerb/EnglishText.jl
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.1
Initial Release
List of initial features
- indefinite for finding the right indefinite article to use
- english for converting a positive integer to an English-language wordy representation, and the inverse function - unenglish to convert the wordy representation back.
- pluralize to pluralize a noun
- ItemList to create a list of objects
- ItemQuantity to associate a noun with a number
- sentences to iterate over the sentences of a text
Motivation
Many applications display information to readers in prose format instead of tabular format. It is often important to generate human-readable, grammatically correct prose. However, taking care of grammatical special cases is tedious. For instance, the following code:
julia> string(ItemList([ItemQuantity(2, "dog"), ItemQuantity(1, "cat")]))
"2 dogs and 1 cat"
Behind the scenes, a variety of special cases are taken care of.
Approach
EnglishText.jl uses established algorithms where available. The precise methods used are documented in the modules themselves.
EnglishText.jl uses a modular approach. Applications not requiring all the exports may use a submodule, such as EnglishText.ItemLists
instead of the entire package.
Goals
- To provide a convenient, universally useful approach to abstracting away grammatical special cases
- To be self-documenting where possible, but well-documented nevertheless
- To not have unnecessary performance bottlenecks
Non-Goals
This is not an NLP package and does not aim to include an English parser.
Use in the Wild
I am using this package in numerous personal projects, including a static site generator I hope to release this year.
Organizations
This package is probably a good candidate for inclusion in JuliaText, though I do not know any member of that organization.