Skip to content

Initial Release

Pre-release
Pre-release
Compare
Choose a tag to compare
@TotalVerb TotalVerb released this 08 Feb 01:19
· 36 commits to master since this 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.