Skip to content

Releases: TotalVerb/EnglishText.jl

v0.6.0

29 Sep 02:56
12fdfeb
Compare
Choose a tag to compare
v0.6.0 Pre-release
Pre-release

Updated to work with Julia 1.0

v0.5.0

04 Sep 20:43
Compare
Choose a tag to compare
v0.5.0 Pre-release
Pre-release
  • Remove isnothing deprecation
  • Drop support for Julia 0.5
  • Fix a deprecation warning on latest nightly of Julia 0.7

v0.4.0

23 Apr 19:03
Compare
Choose a tag to compare
v0.4.0 Pre-release
Pre-release
  • Deprecate isnothing in favor of Base.isempty, and add Base.length for ItemQuantity
  • Fix assorted miscellaneous issues with pluralize and singularize

v0.3.0

11 Apr 06:01
Compare
Choose a tag to compare
v0.3.0 Pre-release
Pre-release
  • Add SemanticText base type as a supertype of all text-like objects

v0.2.0

23 Feb 02:30
Compare
Choose a tag to compare
v0.2.0 Pre-release
Pre-release
  • Add singularize function (Addresses #2)
  • Fix problems with pluralizing compound words
  • Improve precompilation and package load speed

v0.1.1

20 Feb 23:49
Compare
Choose a tag to compare
v0.1.1 Pre-release
Pre-release

Changes in this release

  • Fix a deprecation warning on Julia v0.6
  • Fix #3: incorrect pluralization of "macro"

Initial Release

08 Feb 01:19
Compare
Choose a tag to compare
Initial Release Pre-release
Pre-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.