Skip to content

Commit

Permalink
add test for 's' + apostrophe possessive
Browse files Browse the repository at this point in the history
  • Loading branch information
stratus-ss authored and forslund committed May 8, 2020
1 parent 9eb004d commit f9c02ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_match_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class TestMatchData:
def setup(self):
self.match = MatchData('name', ['one', 'two'], {'{word}': ['value', 'tokens']}, 0.5)
self.sentence = ["it", "'", "s", "a", "new", "sentence"]
self.sentence2 = ["the", "parents", "'", "house"]

def test_detokenize(self):
self.match.detokenize()
Expand All @@ -29,4 +30,6 @@ def test_detokenize(self):

def test_handle_apostrophes(self):
joined_sentence = self.match.handle_apostrophes(self.sentence)
joined_sentence2 = self.match.handle_apostrophes(self.sentence2)
assert joined_sentence == "it's a new sentence"
assert joined_sentence2 == "the parents' house"

0 comments on commit f9c02ab

Please sign in to comment.