mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Add Vietnamese
This commit is contained in:
parent
d4fdb97c87
commit
9ccd0c643b
19
spacy/lang/vi/__init__.py
Normal file
19
spacy/lang/vi/__init__.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# coding: utf8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from ...attrs import LANG
|
||||
from ...language import Language
|
||||
from ...tokens import Doc
|
||||
|
||||
|
||||
class VietnameseDefaults(Language.Defaults):
|
||||
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
|
||||
lex_attr_getters[LANG] = lambda text: 'vi' # for pickling
|
||||
|
||||
|
||||
class Vietnamese(Language):
|
||||
lang = 'vi'
|
||||
Defaults = VietnameseDefaults # override defaults
|
||||
|
||||
|
||||
__all__ = ['Vietnamese']
|
Loading…
Reference in New Issue
Block a user