New locale instruction

Summary: to be more specific

Reviewed By: blandinw

Differential Revision: D6391421

fbshipit-source-id: 5c8e34b7a072ad2820a064c66a2364e866147630
This commit is contained in:
Julien Odent 2017-11-22 16:46:47 -08:00 committed by Facebook Github Bot
parent 93e7010844
commit cc7cf74ff4

View File

@ -74,7 +74,12 @@ files need to be updated:
To add a new language:
* Make sure that the language code used follows the [ISO-639-1 standard](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
* The first dimension to implement is `Numeral`.
* Follow [this example](https://github.com/facebookincubator/duckling/commit/24d3f199768be970149412c95b1c1bf5d76f8240).
* Follow [this example](https://github.com/facebook/duckling/commit/24d3f199768be970149412c95b1c1bf5d76f8240).
To add a new locale:
* There should be a need for diverging rules between the locale and the language.
* Make sure that the locale code is a valid [ISO3166 alpha2 country code](https://www.iso.org/obp/ui/#search/code/).
* Follow [this example](https://github.com/facebook/duckling/commit/1ab5f447d2635fe6d48887a501d333a52adff5b9).
Rules have a name, a pattern and a production.
Patterns are used to perform character-level matching (regexes on input) and