English
Text and Language Processing

Welcome

English is a collection of text manipulation and natural language processing libraries the Ruby programming language. Over time we hope to provide a fairly comprehensive set of tools for working with language data.

Here are some examples:

        require 'english/similarity'

        "Alexsander".similarity( "Aleksander" )  #=> 0.9
      
        require 'english/roman'

        100.to_roman  #=> "C"
        9.to_roman    #=> "IX"
      
        require 'english/textfilter'

        tf = English::TextFilter.new
        tf.rule(/Damn/) { |w| 'Darn' }
        tf.apply("Damn it!")  #=> "Darn it!"
      

Despite the name of the project, some of the libraries are rather language neutral. They will work just as well on any linguistic textual data. Certain libraries, on the other hand are completel English specific. For instance, the inflect.rb provides singluar to plural / plural to singular inflection functions.

        require 'english/inflect'

        "boy".plural      #=> "boys"
        "ox".plural       #=> "oxen"

        "boys".singular   #=> "boy"
        "oxen".singular   #=> "ox"
      
For more details see the API documentation.

Resources


English Grammer
Explinations and Exercises written by Mary Ansell.