# Wordsmith [![API Documentation Website](https://img.shields.io/website?down_color=red&down_message=Offline&label=API%20Documentation&up_message=Online&url=https%3A%2F%2Fluckyframework.github.io%2Fwordsmith%2F)](https://luckyframework.github.io/wordsmith) Wordsmith is a library for pluralizing, ordinalizing, singularizing and doing other fun and useful things with words. ## Installation Add this to your application's `shard.yml`: ```yaml dependencies: wordsmith: github: luckyframework/wordsmith ``` ## Usage ```crystal require "wordsmith" Wordsmith::Inflector.pluralize("word") # "words" Wordsmith::Inflector.singularize("categories") # "category" Wordsmith::Inflector.camelize("application_controller") # "ApplicationController" Wordsmith::Inflector.underscore("CheeseBurger") # "cheese_burger" Wordsmith::Inflector.humanize("employee_id") # "Employee" Wordsmith::Inflector.titleize("amazon web services") # "Amazon Web Services" Wordsmith::Inflector.tableize("User") # "users" Wordsmith::Inflector.classify("users") # "User" Wordsmith::Inflector.dasherize("post_office") # "post-office" Wordsmith::Inflector.ordinalize(4) # "4th" Wordsmith::Inflector.demodulize("Helpers::Mixins::User") # "User" Wordsmith::Inflector.deconstantize("User::FREE_TIER_COMMENTS") # "User" Wordsmith::Inflector.foreign_key("Person") # "person_id" Wordsmith::Inflector.parameterize("Admin/product") # "admin-product" ``` Wordsmith comes with a `ws` CLI utility which allows you to process words from the command line. You can download it directly from the [releases page](https://github.com/luckyframework/wordsmith/releases). ```sh ╰─ $ ./ws Usage: ws