spaCy/spacy/de/__init__.py

25 lines
786 B
Python
Raw Normal View History

2015-09-06 19:56:47 +00:00
from __future__ import unicode_literals, print_function
from os import path
from ..language import Language
2016-09-24 18:26:17 +00:00
from ..vocab import Vocab
from ..attrs import LANG
2015-09-06 19:56:47 +00:00
class German(Language):
lang = 'de'
2016-09-24 18:26:17 +00:00
class Defaults(Language.Defaults):
def Vocab(self, vectors=None, lex_attr_getters=None):
if lex_attr_getters is None:
lex_attr_getters = dict(self.lex_attr_getters)
if vectors is None:
vectors = self.Vectors()
# set a dummy lemmatizer for now that simply returns the same string
# until the morphology is done for German
return Vocab.load(self.path, get_lex_attr=lex_attr_getters, vectors=vectors,
lemmatizer=False)
2016-09-24 18:26:17 +00:00
stop_words = set()