コード例 #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'