Maintainer | hapytexeu+gh@gmail.com |
---|---|
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
This module contains logic to convert numbers to words in the French language.
Synopsis
- french :: NumeralsAlgorithm
- toCardinal' :: Integral i => i -> Text
- ordinize' :: Text -> Text
- negativeWord' :: Text
- zeroWord' :: Text
- oneWord' :: Text
- lowWords' :: Vector Text
- midWords' :: [(Integer, Text)]
- highWords' :: HighNumberAlgorithm
- merge' :: FreeMergerFunction
Num to word algorithm
:: NumeralsAlgorithm | A |
A NumeralsAlgorithm
to convert numbers to words in the French language.
Convert a cardinal number to text
Convert numers to their cardinal counterpart in French.
Convert to ordinal
ordinize' :: Text -> Text Source #
A function that converts a number in words in cardinal form to ordinal form according to the French language rules.
Constant words
negativeWord' :: Text Source #
The words used to mark a negative number in the French language.
Names for numbers
lowWords' :: Vector Text Source #
A Vector
that contains the word used for the numbers two to twenty in the French language.
midWords' :: [(Integer, Text)] Source #
A list of 2-tuples that contains the names of values between thirty and thousand in the French language.
highWords' :: HighNumberAlgorithm Source #
An algorithm to obtain the names of large numbers (one million or larger)
in French. French uses a long scale with the illion
and illiard
suffixes.
Merge function
merge' :: FreeMergerFunction Source #
A merge function that is used to combine the names of words together to larger words, according to the French grammar rules.