mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-25 17:36:30 +03:00
* Upd tests
This commit is contained in:
parent
b8b65903fc
commit
91a5064b7f
|
@ -21,5 +21,5 @@ def test_load_exc(EN, morph_exc):
|
|||
EN.tagger.load_morph_exceptions(morph_exc)
|
||||
tokens = EN('I like his style.', tag=True)
|
||||
his = tokens[2]
|
||||
assert EN.tagger.tag_names[his.pos] == 'PRP$'
|
||||
assert EN.tagger.tag_names[his.fine_pos] == 'PRP$'
|
||||
assert his.lemma == '-PRP-'
|
||||
|
|
|
@ -110,7 +110,6 @@ def test_cnts6(EN):
|
|||
words = [t.string for t in tokens]
|
||||
assert len(words) == 6
|
||||
|
||||
|
||||
#def test_cnts7():
|
||||
# text = 'But then the 6,000-year ice age came...'
|
||||
# tokens = EN.tokenize(text)
|
||||
|
|
|
@ -27,3 +27,8 @@ def test_case_neq(EN):
|
|||
def test_punct_neq(EN):
|
||||
addr = EN.vocab['Hello']
|
||||
assert EN.vocab['Hello,']['sic'] != addr['sic']
|
||||
|
||||
|
||||
def test_shape_attr(EN):
|
||||
example = EN.vocab['example']
|
||||
assert example['sic'] != example['shape']
|
||||
|
|
Loading…
Reference in New Issue
Block a user