Пример #1
0
 def test_should_return_nopunct(self):
     assert get_punctuation_type_feature('abc') == 'NOPUNCT'
Пример #2
0
 def test_should_return_quote(self):
     assert get_punctuation_type_feature('"') == 'QUOTE'
     assert get_punctuation_type_feature('\'') == 'QUOTE'
     assert get_punctuation_type_feature('`') == 'QUOTE'
     assert get_punctuation_type_feature('’') == 'QUOTE'
Пример #3
0
 def test_should_return_punct(self):
     assert get_punctuation_type_feature(',,') == 'PUNCT'
     assert get_punctuation_type_feature('::') == 'PUNCT'
     assert get_punctuation_type_feature(';;') == 'PUNCT'
     assert get_punctuation_type_feature('??') == 'PUNCT'
     assert get_punctuation_type_feature('..') == 'PUNCT'
Пример #4
0
 def test_should_return_hyphen(self):
     assert get_punctuation_type_feature('-') == 'HYPHEN'
     assert get_punctuation_type_feature('–') == 'HYPHEN'
Пример #5
0
 def test_should_return_comma(self):
     assert get_punctuation_type_feature(',') == 'COMMA'
Пример #6
0
 def test_should_return_dot(self):
     assert get_punctuation_type_feature('.') == 'DOT'
Пример #7
0
 def test_should_return_endbracket(self):
     assert get_punctuation_type_feature(')') == 'ENDBRACKET'
     assert get_punctuation_type_feature(']') == 'ENDBRACKET'
Пример #8
0
 def test_should_return_openbracket(self):
     assert get_punctuation_type_feature('(') == 'OPENBRACKET'
     assert get_punctuation_type_feature('[') == 'OPENBRACKET'