Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A port of rails' inflector to common lisp

tree: ccfb860160

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Vana Inflector

A common lisp library to easily pluralize and singularize English words.

This is a support package for the Vana web framework, and is a port of the same from Rails' ActiveSupport module.

Installation

(ql:quickload 'vana-inflector)

Usage

Basic Usage:

(use-package :vana-inflector)
> (pluralize "octopus") 
"octopi"
> (pluralize "datum")
"data"
> (singularize "children")
"child"
> (singularize "cats")
"cat"
> (singularize "data")
"datum"

Use irregular to add an irregular:

> (singularize "feet")
"feet"
> (irregular "foot" "feet")
> (singularize "feet")
"foot"
> (pluralize "foot")
"feet"

Use uncountable to add an uncountable:

> (pluralize "advice")
"advices"
> (singularize "advice")
"advice"
> (singularize "advices")
"advice"
> (uncountable "advice")
> (pluralize "advice")
"advice"

TODO

  • Expand the default lookup lists? Possible (but probably negligible) performance tradeoff for completeness
  • Add methods to transfer between CamelCase, whatJavaScriptDoes, and_this_underscore_style

License

Released under the MIT license, please see LICENSE for more details

Thanks

  • Xach - For quicklisp, really made getting back into CL much easier.
  • Siebel - For PCL, which has been a great reference.
Something went wrong with that request. Please try again.