From e40465487c045bb19adf65d965e93b23a35e3b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Henrik=20Skogstr=C3=B8m?= Date: Tue, 30 Jan 2018 15:44:29 +0100 Subject: [PATCH] Added french syntax iterator with explenation --- spacy/lang/nb/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spacy/lang/nb/__init__.py b/spacy/lang/nb/__init__.py index 900e59626..b6ec65e1e 100644 --- a/spacy/lang/nb/__init__.py +++ b/spacy/lang/nb/__init__.py @@ -13,6 +13,12 @@ from ...language import Language from ...attrs import LANG, NORM 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): lex_attr_getters = dict(Language.Defaults.lex_attr_getters) @@ -22,6 +28,7 @@ class NorwegianDefaults(Language.Defaults): stop_words = STOP_WORDS tag_map = TAG_MAP lemma_lookup = LOOKUP + syntax_iterators = SYNTAX_ITERATORS class Norwegian(Language):