Ejemplo n.º 1
0
 def test_dollar_own_word_2(self):
     sentence = 'That place was $$.'
     words = snippets._split_into_words(sentence)
     assert words == ['That', 'place', 'was', '$$', '.']
Ejemplo n.º 2
0
 def test_price_3(self):
     sentence = 'It costs .47.'
     words = snippets._split_into_words(sentence)
     assert words == ['It', 'costs', '.47', '.']
Ejemplo n.º 3
0
 def test_numbers_part_word(self):
     sentence = 'I am word47word.'
     words = snippets._split_into_words(sentence)
     assert words == ['I', 'am', 'word47word', '.']
Ejemplo n.º 4
0
 def test_dollar_in_word(self):
     sentence = 'It was $10.'
     words = snippets._split_into_words(sentence)
     assert words == ['It', 'was', '$10', '.']
Ejemplo n.º 5
0
 def test_ellipsis(self):
     sentence = 'The food was horrible...'
     words = snippets._split_into_words(sentence)
     assert words == ['The', 'food', 'was', 'horrible', '...']
Ejemplo n.º 6
0
 def test_numbers_own_word(self):
     sentence = 'There are 4 lights.'
     words = snippets._split_into_words(sentence)
     assert words == ['There', 'are', '4', 'lights', '.']
Ejemplo n.º 7
0
 def test_questionmark(self):
     sentence = 'Why am I a frog?'
     words = snippets._split_into_words(sentence)
     assert words == ['Why', 'am', 'I', 'a', 'frog', '?']
Ejemplo n.º 8
0
 def test_exclamationmark(self):
     sentence = 'You are SO a frog!'
     words = snippets._split_into_words(sentence)
     assert words == ['You', 'are', 'SO', 'a', 'frog', '!']
Ejemplo n.º 9
0
 def test_commas(self):
     sentence = 'Comma, comma, comma.'
     words = snippets._split_into_words(sentence)
     assert words == ['Comma', ',', 'comma', ',', 'comma', '.']
Ejemplo n.º 10
0
 def test_mixedcase_period(self):
     sentence = 'I am NOT a frog.'
     words = snippets._split_into_words(sentence)
     assert words == ['I', 'am', 'NOT', 'a', 'frog', '.']
Ejemplo n.º 11
0
 def test_lowercase_period(self):
     sentence = 'i am not a frog.'
     words = snippets._split_into_words(sentence)
     assert words == ['i', 'am', 'not', 'a', 'frog', '.']