spaCy/spacy/de/__init__.py

21 lines
569 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
from ..vocab import Vocab
from .. import attrs
from .. import util
from .. import about
2015-09-06 19:56:47 +00:00
class German(Language):
lang = 'de'
@classmethod
def default_vocab(cls, package, get_lex_attr=None, vectors_package=None):
vocab = super(German,cls).default_vocab(package,get_lex_attr,vectors_package)
# for now until the morphology is done for German
vocab.morphology.lemmatizer = lambda string,pos: set([string])
return vocab