1. Jul 20th, 2006

    Ruby Linguistics Framework

    This, is amazing.

    Pluralization

    require 'linguistics'
    Linguistics::use( :en ) # extends Array, String, and Numeric
    
    "box".en.plural # => "boxes"
    "mouse".en.plural # => "mice"
    "ruby".en.plural # => "rubies"

    Present Participles

    "runs".en.present_participle # => "running"
    "eats".en.present_participle # => "eating"
    "spies".en.present_participle # => "spying"

    Conjunctions

    allobjs = []
    ObjectSpace::each_object {|obj| allobjs < < obj.class.name}
    puts "The current Ruby objectspace contains: " +   allobjs.en.conjunction( :generalize => true )
    The current Ruby objectspace contains: thousands of Strings,
    thousands of Arrays, hundreds of Hashes, hundreds of Classes,
    many Regexps, a number of Ranges, a number of Modules,
    several Floats, several Procs, several MatchDatas, several Objects,
    several IOS, several Files, a Binding, a NoMemoryError,
    a SystemStackError, a fatal, a ThreadGroup, and a Thread

    And a lot of other cool tricks with Ruby and English. (And I’m guessing you can add other languages as well)

    Via Ruby Inside.

    1. Jul 20th, 2006

      Sterling Camden

      I just love Ruby. It builds and builds, without excess infrastructure.

    2. Jul 20th, 2006

      Assaf

      And always keeps it short, simple and sweet.

    3. Jul 21st, 2006

      Andre Lewis

      Nice find, that’s a sweet plugin

    Your comment, here ⇓