New language instructions

Summary: Updated `README.md` with instructions on how to add a new language in Duckling.

Reviewed By: JonCoens

Differential Revision: D5712523

fbshipit-source-id: 6f5eda0
This commit is contained in:
Julien Odent 2017-08-25 17:21:37 -07:00 committed by Facebook Github Bot
parent 7df488fbe2
commit b5e646d8f6

View File

@ -69,6 +69,11 @@ files need to be updated:
* `Duckling/<dimension>/<language>/Rules.hs`
* `Duckling/<dimension>/<language>/Corpus.hs`
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).
Rules have a name, a pattern and a production.
Patterns are used to perform character-level matching (regexes on input) and
concept-level matching (predicates on tokens).