From 6bd34e9d548bd236fafd21811e6fb76fa3ff8932 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Wed, 6 Mar 2019 14:21:15 +0100 Subject: [PATCH] Expose Japanese stop words (closes #3346) --- spacy/lang/ja/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spacy/lang/ja/__init__.py b/spacy/lang/ja/__init__.py index 5570b1cef..39a3a3385 100644 --- a/spacy/lang/ja/__init__.py +++ b/spacy/lang/ja/__init__.py @@ -4,6 +4,7 @@ from __future__ import unicode_literals, print_function import re from collections import namedtuple +from .stop_words import STOP_WORDS from .tag_map import TAG_MAP from ...attrs import LANG from ...language import Language @@ -90,6 +91,7 @@ class JapaneseTokenizer(DummyTokenizer): class JapaneseDefaults(Language.Defaults): lex_attr_getters = dict(Language.Defaults.lex_attr_getters) lex_attr_getters[LANG] = lambda _text: "ja" + stop_words = STOP_WORDS tag_map = TAG_MAP @classmethod