mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
Start testing morphology class
This commit is contained in:
parent
4b7e772f5d
commit
9998d9b9ff
0
spacy/tests/morphology/__init__.py
Normal file
0
spacy/tests/morphology/__init__.py
Normal file
25
spacy/tests/morphology/test_morph_features.py
Normal file
25
spacy/tests/morphology/test_morph_features.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
from __future__ import unicode_literals
|
||||
import pytest
|
||||
|
||||
from ...morphology import Morphology
|
||||
from ...strings import StringStore
|
||||
from ...lemmatizer import Lemmatizer
|
||||
from ...symbols import *
|
||||
|
||||
@pytest.fixture
|
||||
def morphology():
|
||||
return Morphology(StringStore(), {}, Lemmatizer())
|
||||
|
||||
def test_init(morphology):
|
||||
pass
|
||||
|
||||
def test_add_tag_with_string_names(morphology):
|
||||
morphology.add({"Case_gen", "Number_Sing"})
|
||||
|
||||
def test_add_tag_with_int_ids(morphology):
|
||||
morphology.add({Case_gen, Number_sing})
|
||||
|
||||
def test_add_tag_with_mix_strings_and_ints(morphology):
|
||||
morphology.add({PunctSide_ini, 'VerbType_aux'})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user