Numbers Application#
Application ID
eot_numbers
Application Aliases
numbers.app eot/numbers.app
Description#
The Numbers application resolves written numbers, unit and money amounts. This can be used to normalize numbers.
Configuration#
The configuration is an object defined as (bold = required, italic = optional):
comma_separator (
string
) – Which character to use as a comma separator (,
or.
). This will only be used in case of doubtlanguage (
string
) – Language that will be used to handle numbers in different languagessource (
string
) – Wowool source code to annotate a Number. This parameter is usually not needed as it has been annotated by other domains like entity or if the language has been set
Example#
Enrich the annotation with extra attributes like amount and currency or unit.
wow -p "english,numbers,numbers.app" \
-i "I have twenty-one bn and seven hundred dollar."
which yields:
S:( 0, 46)
C:( 0, 46): Sentence
T:( 0, 1): I,{+1p, +init-cap, +init-token, +nom, +sg},[I:Pron-Pers]
T:( 2, 6): have,[have:V-Pres-have]
C:( 7, 45): MoneyAmount,@(amount='21000000700.0' currency='dollar' )
C:( 7, 38): Number,@(canonical='21000000700.0' )
T:( 7, 13): twenty,{+english-numbers},[twenty:Num-Std]
T:( 13, 14): -,[-:Punct]
T:( 14, 17): one,{+english-numbers},[one:Num-Std]
T:( 18, 20): bn,{+9, +english-numbers, +value},[billion:Num-Std]
T:( 21, 24): and,[and:Conj-Coord]
T:( 25, 30): seven,{+english-numbers},[seven:Num-Std]
T:( 31, 38): hundred,{+english-numbers, +quant},[hundred:Num-Std]
T:( 39, 45): dollar,{+currency},[dollar:Nn-Sg]
T:( 45, 46): .,[.:Punct-Sent]
For an interpretation of the JSON data, refer to the application’s JSON schema.