Expose Japanese stop words (closes #3346)

This commit is contained in:
Ines Montani 2019-03-06 14:21:15 +01:00
parent 85deb96278
commit 6bd34e9d54

View File

@ -4,6 +4,7 @@ from __future__ import unicode_literals, print_function
import re import re
from collections import namedtuple from collections import namedtuple
from .stop_words import STOP_WORDS
from .tag_map import TAG_MAP from .tag_map import TAG_MAP
from ...attrs import LANG from ...attrs import LANG
from ...language import Language from ...language import Language
@ -90,6 +91,7 @@ class JapaneseTokenizer(DummyTokenizer):
class JapaneseDefaults(Language.Defaults): class JapaneseDefaults(Language.Defaults):
lex_attr_getters = dict(Language.Defaults.lex_attr_getters) lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
lex_attr_getters[LANG] = lambda _text: "ja" lex_attr_getters[LANG] = lambda _text: "ja"
stop_words = STOP_WORDS
tag_map = TAG_MAP tag_map = TAG_MAP
@classmethod @classmethod