inflections alternatives and similar packages
Based on the "Text" category.
Alternatively, view inflections alternatives based on common mentions on social networks and blogs.
-
pandoc-citeproc
Library and executable for using citeproc with pandoc -
scholdoc
Fork of Pandoc for the implementation of a ScholarlyMarkdown parser -
prettyprinter
A modern, extensible and well-documented prettyprinter. -
blaze-from-html
A blazingly fast HTML combinator library for Haskell. -
skylighting
A Haskell syntax highlighting library with tokenizers derived from KDE syntax highlighting descriptions -
commonmark
Pure Haskell commonmark parsing library, designed to be flexible and extensible -
regex-genex
Given a list of regexes, generate all possible strings that matches all of them. -
regex-applicative
Regex-based parsing with an applicative interface -
pandoc-csv2table
A Pandoc filter that renders CSV as Pandoc Markdown Tables. -
servant-checked-exceptions
type-level errors for Servant APIs. -
pretty-show
Tools for working with derived Show instances in Haskell. -
double-conversion
A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library. -
text-format
A Haskell text formatting library optimized for ease of use and high performance. -
diagrams-pandoc
A pandoc filter to express diagrams inline using the haskell EDSL diagrams. -
hyphenation
Knuth-Liang Hyphenation for Haskell based on TeX hyphenation files
Learn any GitHub repo in 59 seconds
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of inflections or a related project?
README
String Inflections for Haskell
This library is a partial port of the
String Inflector
from Ruby on Rails. It currently implements methods such as parameterize
,
transliterate
, camelize
, underscore
and dasherize
. Please see the
haddock documentation for a complete list of the functions implemented by this
library.
Unlike the ActiveSupport (Rails) and Ember implementations of inflections, this
library uses a parser to verify the input to functions like camelize
. This is
done to ensure that the output strings adhere to the syntax that they are
supposed to generate. You can read more about the philosophy behind this library
in the
Haddock documentation.
Usage
The following examples demonstrate usage of the parameterize
, transliterate
and camelize
functions:
λ: parameterize "Hola. ¿Cómo estás?"
"hola-como-estas"
λ: transliterate "Hola. ¿Cómo estás?"
"Hola. ?Como estas?"
λ: import Control.Monad (liftM)
λ: liftM camelize $ parseSnakeCase "hey_there"
"HeyThere"
Customization
Part of parameterizing strings is approximating all characters in the input
encoding to ASCII characters. This library copies the character approximation
table from the Ruby i18n library. This data structure is provided as
defaultCharacterTransliterations
. You can provide your own transliteration map
by passing a Map structure (from Data.Map) to the parameterizeCustom
function.
If you want to specify a custom default replacement or approximation table for
the transliterate
function, you should instead call the transliterateCustom
function which accepts a String for replacements and a Map for substitution.
TODO
I'd like this library to implement other functions found in the Rails inflections library. If you need one of those functions, please submit a pull request!
Further documentation
For more information, please see the the Haddock docs for this module.
Author
Justin Leitgeb [email protected]
Contributing
You may submit pull requests to this repository on GitHub. Tests are appreciated with your contribution.
License
MIT - see [the LICENSE file](LICENSE).
*Note that all licence references and agreements mentioned in the inflections README section above
are relevant to that project's source code only.