Difference between revisions of "Talk:NUMBERTEXT/MONEYTEXT development"
(New Catalan definiton fixing errors) |
m (→Some fixes on Catalan definition) |
||
Line 16: | Line 16: | ||
== Some fixes on Catalan definition == | == Some fixes on Catalan definition == | ||
+ | |||
__numbertext__ | __numbertext__ | ||
+ | |||
^0 zero | ^0 zero | ||
+ | |||
1$ u | 1$ u | ||
+ | |||
1 un | 1 un | ||
+ | |||
2 dos | 2 dos | ||
+ | |||
3 tres | 3 tres | ||
+ | |||
4 quatre | 4 quatre | ||
+ | |||
5 cinc | 5 cinc | ||
+ | |||
6 sis | 6 sis | ||
+ | |||
7 set | 7 set | ||
+ | |||
8 vuit | 8 vuit | ||
+ | |||
9 nou | 9 nou | ||
+ | |||
10 deu | 10 deu | ||
+ | |||
11 onze | 11 onze | ||
+ | |||
12 dotze | 12 dotze | ||
+ | |||
13 tretze | 13 tretze | ||
+ | |||
14 catorze | 14 catorze | ||
+ | |||
15 quinze | 15 quinze | ||
+ | |||
16 setze | 16 setze | ||
+ | |||
17 disset | 17 disset | ||
+ | |||
1(\d) di$1 | 1(\d) di$1 | ||
+ | |||
20 vint | 20 vint | ||
+ | |||
2(\d) vint-i-$1 | 2(\d) vint-i-$1 | ||
+ | |||
30 trenta | 30 trenta | ||
+ | |||
40 quaranta | 40 quaranta | ||
+ | |||
50 cinquanta | 50 cinquanta | ||
+ | |||
60 seixanta | 60 seixanta | ||
+ | |||
70 setanta | 70 setanta | ||
+ | |||
80 vuitanta | 80 vuitanta | ||
+ | |||
90 noranta | 90 noranta | ||
+ | |||
(\d)(\d) $(\10)-$2 | (\d)(\d) $(\10)-$2 | ||
+ | |||
1(\d\d) cent $1 | 1(\d\d) cent $1 | ||
+ | |||
(\d)(\d\d) $1-cents $2 | (\d)(\d\d) $1-cents $2 | ||
+ | |||
1(\d{3}) mil $1 | 1(\d{3}) mil $1 | ||
+ | |||
(\d{1,3})(\d{3}) $1 mil $2 | (\d{1,3})(\d{3}) $1 mil $2 | ||
+ | |||
1(\d{6}) un milió $1 | 1(\d{6}) un milió $1 | ||
+ | |||
(\d{1,6})(\d{6}) $1 milions $2 | (\d{1,6})(\d{6}) $1 milions $2 | ||
+ | |||
1(\d{9}) mil milions $1 | 1(\d{9}) mil milions $1 | ||
+ | |||
1(\d{12}) un bilió $1 | 1(\d{12}) un bilió $1 | ||
+ | |||
(\d{1,6})(\d{12}) $1 bilions $2 | (\d{1,6})(\d{12}) $1 bilions $2 | ||
+ | |||
1(\d{18}) un trilió $1 | 1(\d{18}) un trilió $1 | ||
+ | |||
(\d{1,6})(\d{18}) $1 trilions $2 | (\d{1,6})(\d{18}) $1 trilions $2 | ||
+ | |||
1(\d{24}) un quadrilió $1 | 1(\d{24}) un quadrilió $1 | ||
+ | |||
(\d{1,6})(\d{24}) $1 quadrilions $2 | (\d{1,6})(\d{24}) $1 quadrilions $2 | ||
+ | |||
# negative number? | # negative number? | ||
Line 68: | Line 113: | ||
"([-−]?\d+)[.,]" $1| coma | "([-−]?\d+)[.,]" $1| coma | ||
+ | |||
"([-−]?\d+[.,]\d*)(\d)" $1| |$2 | "([-−]?\d+[.,]\d*)(\d)" $1| |$2 | ||
Line 75: | Line 121: | ||
us:([^,]*),([^,]*),([^,]*),([^,]*) \1 | us:([^,]*),([^,]*),([^,]*),([^,]*) \1 | ||
+ | |||
up:([^,]*),([^,]*),([^,]*),([^,]*) \2 | up:([^,]*),([^,]*),([^,]*),([^,]*) \2 | ||
+ | |||
ss:([^,]*),([^,]*),([^,]*),([^,]*) \3 | ss:([^,]*),([^,]*),([^,]*),([^,]*) \3 | ||
+ | |||
sp:([^,]*),([^,]*),([^,]*),([^,]*) \4 | sp:([^,]*),([^,]*),([^,]*),([^,]*) \4 | ||
CHF:(\D+) $(\1: franc suís, francs suís, cèntim, cèntims) | CHF:(\D+) $(\1: franc suís, francs suís, cèntim, cèntims) | ||
+ | |||
EUR:(\D+) $(\1: euro, euros, cèntim, cèntims) | EUR:(\D+) $(\1: euro, euros, cèntim, cèntims) | ||
+ | |||
GBP:(\D+) $(\1: lliura esterlina, lliures esterlines, penic, penics) | GBP:(\D+) $(\1: lliura esterlina, lliures esterlines, penic, penics) | ||
+ | |||
JPY:(\D+) $(\1: ien, iens, sen, sen) | JPY:(\D+) $(\1: ien, iens, sen, sen) | ||
+ | |||
USD:(\D+) $(\1: dòlar EUA, dòlar EUA, cent, cents) | USD:(\D+) $(\1: dòlar EUA, dòlar EUA, cent, cents) | ||
"([A-Z]{3}) ([-−]?1)([.,]00?)?" $2 $(\1:us) | "([A-Z]{3}) ([-−]?1)([.,]00?)?" $2 $(\1:us) | ||
+ | |||
"([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2 $(\1:up) | "([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2 $(\1:up) | ||
"(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 amb $(1) $(\2:ss) | "(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 amb $(1) $(\2:ss) | ||
+ | |||
"(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 amb $(\30) $(\2:sp) | "(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 amb $(\30) $(\2:sp) | ||
+ | |||
"(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 amb $3 $(\2:sp) | "(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 amb $3 $(\2:sp) |
Revision as of 21:05, 27 August 2009
Discussion page of NUMBERTEXT/MONEYTEXT development
Start a new section for a new theme, bug report or a language module (Soros program). See also NUMBERTEXT.org.
License requirements: Soros programs of NUMBERTEXT project are released under LGPL/BSD dual-license.
Some languages need male/female option for number to text
Hi, in Catalan de numbers 1 and 2 can be male or female, based on what's numered. Example: cotxe (car) is male and flor (flower) is female. So 1 cotxe (one car) is spelled "un cotxe" and 1 flor (one flower) is spelled "una flor". So, 1--> un (if male noun) and una (if female noun), 2 --> dos (if male noun) and dues (if female noun).
This male/female change also happens in numbers finished in 1 and 2 different that 11 and 12 (21, 22, 31, 32, ...) and also in hundreds and thousands.
Spanish also has this male/female, but only in numbers finished in 1. In Spanish 2 it's always spelled "dos".
Finally, this male/female isseu als is important for currency to text. Many currency are treated as male nouns: euro, dollar. But few currencis are "female": sterling pounds or the old spanish peseta. So, 1200 $ is spelled as "mil dos-cents dòllars", but 1200 PTA is spelled as "mil dues-centes pessetes".
Some fixes on Catalan definition
__numbertext__
^0 zero
1$ u
1 un
2 dos
3 tres
4 quatre
5 cinc
6 sis
7 set
8 vuit
9 nou
10 deu
11 onze
12 dotze
13 tretze
14 catorze
15 quinze
16 setze
17 disset
1(\d) di$1
20 vint
2(\d) vint-i-$1
30 trenta
40 quaranta
50 cinquanta
60 seixanta
70 setanta
80 vuitanta
90 noranta
(\d)(\d) $(\10)-$2
1(\d\d) cent $1
(\d)(\d\d) $1-cents $2
1(\d{3}) mil $1
(\d{1,3})(\d{3}) $1 mil $2
1(\d{6}) un milió $1
(\d{1,6})(\d{6}) $1 milions $2
1(\d{9}) mil milions $1
1(\d{12}) un bilió $1
(\d{1,6})(\d{12}) $1 bilions $2
1(\d{18}) un trilió $1
(\d{1,6})(\d{18}) $1 trilions $2
1(\d{24}) un quadrilió $1
(\d{1,6})(\d{24}) $1 quadrilions $2
- negative number?
[-−](\d+) menys |$1
- decimals
"([-−]?\d+)[.,]" $1| coma
"([-−]?\d+[.,]\d*)(\d)" $1| |$2
- currency
- unit/subunit singular/plural
us:([^,]*),([^,]*),([^,]*),([^,]*) \1
up:([^,]*),([^,]*),([^,]*),([^,]*) \2
ss:([^,]*),([^,]*),([^,]*),([^,]*) \3
sp:([^,]*),([^,]*),([^,]*),([^,]*) \4
CHF:(\D+) $(\1: franc suís, francs suís, cèntim, cèntims)
EUR:(\D+) $(\1: euro, euros, cèntim, cèntims)
GBP:(\D+) $(\1: lliura esterlina, lliures esterlines, penic, penics)
JPY:(\D+) $(\1: ien, iens, sen, sen)
USD:(\D+) $(\1: dòlar EUA, dòlar EUA, cent, cents)
"([A-Z]{3}) ([-−]?1)([.,]00?)?" $2 $(\1:us)
"([A-Z]{3}) ([-−]?\d+)([.,]00?)?" $2 $(\1:up)
"(([A-Z]{3}) [-−]?\d+)[.,](01)" $1 amb $(1) $(\2:ss)
"(([A-Z]{3}) [-−]?\d+)[.,](\d)" $1 amb $(\30) $(\2:sp)
"(([A-Z]{3}) [-−]?\d+)[.,](\d\d)" $1 amb $3 $(\2:sp)