From eac9e99086b2c2b58ee57c0c3b621ac90116ac47 Mon Sep 17 00:00:00 2001 From: ines Date: Wed, 11 Oct 2017 14:21:15 +0200 Subject: [PATCH] Update docs on adding lemmatization to languages --- .../_adding-languages/_language-data.jade | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/website/usage/_adding-languages/_language-data.jade b/website/usage/_adding-languages/_language-data.jade index 81a6d638e..dc86b7a03 100644 --- a/website/usage/_adding-languages/_language-data.jade +++ b/website/usage/_adding-languages/_language-data.jade @@ -456,24 +456,11 @@ p } p - | To add a lookup lemmatizer to your language, import the #[code LOOKUP] - | table and #[code Lemmatizer], and create a new classmethod: + | To provide a lookup lemmatizer for your language, import the lookup table + | and add it to the #[code Language] class as #[code lemma_lookup]: - -+code("__init__py (excerpt)"). - # other imports here, plus lookup table and lookup lemmatizer - from .lemmatizer import LOOKUP - from ...lemmatizerlookup import Lemmatizer - - class Xxxxx(Language): - lang = 'xx' - - class Defaults(Language.Defaults): - # other language defaults here - - @classmethod - def create_lemmatizer(cls, nlp=None): - return Lemmatizer(LOOKUP) ++code. + lemma_lookup = dict(LOOKUP) +h(3, "tag-map") Tag map