Added french syntax iterator with explenation

This commit is contained in:
Ole Henrik Skogstrøm 2018-01-30 15:44:29 +01:00
parent 8901814248
commit e40465487c
1 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,12 @@ from ...language import Language
from ...attrs import LANG, NORM from ...attrs import LANG, NORM
from ...util import update_exc, add_lookups from ...util import update_exc, add_lookups
# Borrowing french syntax parser because both languages use
# universal dependencies for tagging/parsing.
# Read here for more:
# https://github.com/explosion/spaCy/pull/1882#issuecomment-361409573
from ..fr.syntax_iterators import SYNTAX_ITERATORS
class NorwegianDefaults(Language.Defaults): class NorwegianDefaults(Language.Defaults):
lex_attr_getters = dict(Language.Defaults.lex_attr_getters) lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
@ -22,6 +28,7 @@ class NorwegianDefaults(Language.Defaults):
stop_words = STOP_WORDS stop_words = STOP_WORDS
tag_map = TAG_MAP tag_map = TAG_MAP
lemma_lookup = LOOKUP lemma_lookup = LOOKUP
syntax_iterators = SYNTAX_ITERATORS
class Norwegian(Language): class Norwegian(Language):