* Rejigged tests. Working possessives, but no other contractions

This commit is contained in:
Matthew Honnibal 2014-07-06 20:02:00 +02:00
parent 72159e7011
commit 9bef797afe
2 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -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