[fix] vignt => vingt in French numex

This commit is contained in:
Al
2016-03-29 02:18:37 -04:00
parent 71bc721d0b
commit 378459fde8
3 changed files with 25 additions and 25 deletions

View File

@@ -31,7 +31,7 @@ Here's a short list of some less straightforward normalizations in various langu
| One-hundred twenty E 96th St | 120 east 96th street | | One-hundred twenty E 96th St | 120 east 96th street |
| C/ Ocho, P.I. 4 | calle 8 polígono industrial 4 | | C/ Ocho, P.I. 4 | calle 8 polígono industrial 4 |
| V XX Settembre, 20 | via 20 settembre 20 | | V XX Settembre, 20 | via 20 settembre 20 |
| Quatre vignt douze R. de l'Église | 92 rue de l' église | | Quatre vingt douze R. de l'Église | 92 rue de l' église |
| ул Каретный Ряд, д 4, строение 7 | улица каретныи ряд дом 4 строение 7 | | ул Каретный Ряд, д 4, строение 7 | улица каретныи ряд дом 4 строение 7 |
| ул Каретный Ряд, д 4, строение 7 | ulitsa karetnyy ryad dom 4 stroyeniye 7 | | ул Каретный Ряд, д 4, строение 7 | ulitsa karetnyy ryad dom 4 stroyeniye 7 |
| Marktstrasse 14 | markt straße 14 | | Marktstrasse 14 | markt straße 14 |
@@ -50,7 +50,7 @@ Here's an example using the Python bindings for succinctness (most of the higher
```python ```python
from postal.expand import expand_address from postal.expand import expand_address
expansions = expand_address('Quatre-vignt-douze Ave des Champs-Élysées') expansions = expand_address('Quatre-vingt-douze Ave des Champs-Élysées')
assert '92 avenue des champs-elysees' in set(expansions) assert '92 avenue des champs-elysees' in set(expansions)
``` ```
@@ -70,7 +70,7 @@ int main(int argc, char **argv) {
size_t num_expansions; size_t num_expansions;
normalize_options_t options = get_libpostal_default_options(); normalize_options_t options = get_libpostal_default_options();
char **expansions = expand_address("Quatre-vignt-douze Ave des Champs-Élysées", options, &num_expansions); char **expansions = expand_address("Quatre-vingt-douze Ave des Champs-Élysées", options, &num_expansions);
for (size_t i = 0; i < num_expansions; i++) { for (size_t i = 0; i < num_expansions; i++) {
printf("%s\n", expansions[i]); printf("%s\n", expansions[i]);
@@ -220,7 +220,7 @@ After building libpostal:
``` ```
cd src/ cd src/
./libpostal "Quatre vignt douze Ave des Champs-Élysées" ./libpostal "Quatre vingt douze Ave des Champs-Élysées"
``` ```
If you have a text file or stream with one address per line, the command-line interface also accepts input from stdin: If you have a text file or stream with one address per line, the command-line interface also accepts input from stdin:
@@ -310,7 +310,7 @@ The dictionaries are also used to abbreviate canonical phrases like "Calle" => "
(performed on both the language classifier and the address parser training sets) (performed on both the language classifier and the address parser training sets)
- **Numeric expression parsing** ("twenty first" => 21st, - **Numeric expression parsing** ("twenty first" => 21st,
"quatre-vignt-douze" => 92, again using data provided in CLDR), supports > 30 "quatre-vingt-douze" => 92, again using data provided in CLDR), supports > 30
languages. Handles languages with concatenated expressions e.g. languages. Handles languages with concatenated expressions e.g.
milleottocento => 1800. Optionally normalizes Roman numerals regardless of the milleottocento => 1800. Optionally normalizes Roman numerals regardless of the
language (IX => 9) which occur in the names of many monarchs, popes, etc. language (IX => 9) which occur in the names of many monarchs, popes, etc.

View File

@@ -173,28 +173,28 @@
"right": "add" "right": "add"
}, },
{ {
"name": "quatre vignts", "name": "quatre vingts",
"value": 80, "value": 80,
"type": "cardinal", "type": "cardinal",
"radix": 20, "radix": 20,
"right": "add" "right": "add"
}, },
{ {
"name": "quatrevignts", "name": "quatrevingts",
"value": 80, "value": 80,
"type": "cardinal", "type": "cardinal",
"radix": 20, "radix": 20,
"right": "add" "right": "add"
}, },
{ {
"name": "quatre vignt", "name": "quatre vingt",
"value": 80, "value": 80,
"type": "cardinal", "type": "cardinal",
"radix": 20, "radix": 20,
"right": "add" "right": "add"
}, },
{ {
"name": "quatrevignt", "name": "quatrevingt",
"value": 80, "value": 80,
"type": "cardinal", "type": "cardinal",
"radix": 20, "radix": 20,
@@ -814,23 +814,23 @@
"category": "plural" "category": "plural"
}, },
{ {
"name": "vigntieme", "name": "vingtieme",
"value": 20, "value": 20,
"type": "ordinal" "type": "ordinal"
}, },
{ {
"name": "vigntième", "name": "vingtième",
"value": 20, "value": 20,
"type": "ordinal" "type": "ordinal"
}, },
{ {
"name": "vigntiemes", "name": "vingtiemes",
"value": 20, "value": 20,
"type": "ordinal", "type": "ordinal",
"category": "plural" "category": "plural"
}, },
{ {
"name": "vigntièmes", "name": "vingtièmes",
"value": 20, "value": 20,
"type": "ordinal", "type": "ordinal",
"category": "plural" "category": "plural"
@@ -946,45 +946,45 @@
"category": "plural" "category": "plural"
}, },
{ {
"name": "quatre vigntieme", "name": "quatre vingtieme",
"value": 80, "value": 80,
"type": "ordinal" "type": "ordinal"
}, },
{ {
"name": "quatre vigntième", "name": "quatre vingtième",
"value": 80, "value": 80,
"type": "ordinal" "type": "ordinal"
}, },
{ {
"name": "quatre vigntiemes", "name": "quatre vingtiemes",
"value": 80, "value": 80,
"type": "ordinal", "type": "ordinal",
"category": "plural" "category": "plural"
}, },
{ {
"name": "quatre vigntièmes", "name": "quatre vingtièmes",
"value": 80, "value": 80,
"type": "ordinal", "type": "ordinal",
"category": "plural" "category": "plural"
}, },
{ {
"name": "quatrevigntieme", "name": "quatrevingtieme",
"value": 80, "value": 80,
"type": "ordinal" "type": "ordinal"
}, },
{ {
"name": "quatrevigntième", "name": "quatrevingtième",
"value": 80, "value": 80,
"type": "ordinal" "type": "ordinal"
}, },
{ {
"name": "quatrevigntiemes", "name": "quatrevingtiemes",
"value": 80, "value": 80,
"type": "ordinal", "type": "ordinal",
"category": "plural" "category": "plural"
}, },
{ {
"name": "quatrevigntièmes", "name": "quatrevingtièmes",
"value": 80, "value": 80,
"type": "ordinal", "type": "ordinal",
"category": "plural" "category": "plural"

View File

@@ -35,9 +35,9 @@ TEST test_numeric_expressions(void) {
CHECK_CALL(test_numex("ten and four", "10 and 4", "en")); CHECK_CALL(test_numex("ten and four", "10 and 4", "en"));
// French (Celtic-style) numbers // French (Celtic-style) numbers
CHECK_CALL(test_numex("quatre-vignt-douze", "92", "fr")); CHECK_CALL(test_numex("quatre-vingt-douze", "92", "fr"));
CHECK_CALL(test_numex("quatre vignt douze", "92", "fr")); CHECK_CALL(test_numex("quatre vingt douze", "92", "fr"));
CHECK_CALL(test_numex("quatre vignts", "80", "fr")); CHECK_CALL(test_numex("quatre vingts", "80", "fr"));
CHECK_CALL(test_numex("soixante-et-onze", "71", "fr")); CHECK_CALL(test_numex("soixante-et-onze", "71", "fr"));
CHECK_CALL(test_numex("soixante-cinq", "65", "fr")); CHECK_CALL(test_numex("soixante-cinq", "65", "fr"));