mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-10 19:57:17 +03:00
* Rejigged tests. Working possessives, but no other contractions
This commit is contained in:
parent
72159e7011
commit
9bef797afe
|
@ -18,11 +18,10 @@ def test_close(close_puncts):
|
|||
for p in close_puncts:
|
||||
string = word_str + p
|
||||
token = lookup(string)
|
||||
assert unhash(lex_of(token)) == word_str
|
||||
tokens = expand_chunk(token)
|
||||
assert len(tokens) == 2
|
||||
assert unhash(lex_of(tokens[0])) == word_str
|
||||
assert unhash(lex_of(tokens[1])) == p
|
||||
assert unhash(lex_of(tokens[0])) == word_str
|
||||
|
||||
|
||||
def test_two_different_close(close_puncts):
|
||||
|
@ -43,6 +42,6 @@ def test_three_same_close(close_puncts):
|
|||
for p in close_puncts:
|
||||
string = word_str + p + p + p
|
||||
tokens = expand_chunk(lookup(string))
|
||||
assert len(tokens) == 2
|
||||
assert len(tokens) == 4
|
||||
assert unhash(lex_of(tokens[0])) == word_str
|
||||
assert unhash(lex_of(tokens[1])) == p + p + p
|
||||
assert unhash(lex_of(tokens[1])) == p
|
||||
|
|
|
@ -43,8 +43,8 @@ def test_three_same_open(open_puncts):
|
|||
for p in open_puncts:
|
||||
string = p + p + p + word_str
|
||||
token = lookup(string)
|
||||
assert unhash(lex_of(token)) == p + p + p
|
||||
assert unhash(lex_of(token)) == p
|
||||
tokens = expand_chunk(token)
|
||||
assert len(tokens) == 2
|
||||
assert unhash(lex_of(tokens[0])) == p + p + p
|
||||
assert unhash(lex_of(tokens[1])) == word_str
|
||||
assert len(tokens) == 4
|
||||
assert unhash(lex_of(tokens[0])) == p
|
||||
assert unhash(lex_of(tokens[3])) == word_str
|
||||
|
|
Loading…
Reference in New Issue
Block a user