ordinal-0.5.0.0: Convert numbers to words in different languages.
Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Text.Numerals.Languages.English

Description

This module contains logic to convert numbers to words in the English language.

Synopsis

Num to word algorithm

english Source #

Arguments

:: NumeralsAlgorithm

A NumeralsAlgorithm that can be used to convert numbers to different formats.

A NumeralsAlgorithm to convert numbers to words in the English language.

Convert a cardinal number to text

toCardinal' Source #

Arguments

:: Integral i 
=> i

The number to convert to text.

-> Text

The cardinal counterpart in English.

Convert numers to their cardinal counterpart in English.

Convert to ordinal

ordinize' :: Text -> Text Source #

A function that converts a number in words in cardinal form to ordinal form according to the English language rules.

Constant words

negativeWord' :: Text Source #

The words used to mark a negative number in the English language.

zeroWord' :: Text Source #

The word used for the number zero in the English language.

oneWord' :: Text Source #

The word used for the number one in the English language.

Names for numbers

lowWords' :: Vector Text Source #

A Vector that contains the word used for the numbers two to twenty in the English language.

midWords' :: [(Integer, Text)] Source #

A list of 2-tuples that contains the names of values between thirty and thousand in the English language.

highWords' :: HighNumberAlgorithm Source #

An algorithm to obtain the names of large numbers (one million or larger) in English. English uses a short scale with the illion suffix.

Merge function

merge' :: Integral i => i -> i -> Text -> Text -> Text Source #

A merge function that is used to combine the names of words together to larger words, according to the English grammar rules.

Orphan instances

Default NumeralsAlgorithm Source # 
Instance details