1 from translate.search import terminology
2
4 """Test terminology matching"""
9
11 """Tests that brackets at the end of a term are ignored"""
12 termmatcher = terminology.TerminologyComparer()
13 assert termmatcher.similarity("Open file", "file (noun)") > 75
14 assert termmatcher.similarity("Contact your ISP", "ISP (Internet Service Provider)") > 75
15
21
26
28 """Tests that we can match with some spacing mismatch"""
29 termmatcher = terminology.TerminologyComparer()
30 assert termmatcher.similarity("You can preorder", "pre-order") > 75
31 assert termmatcher.similarity("You can pre-order", "pre order") > 75
32 assert termmatcher.similarity("You can preorder", "pre order") > 75
33 assert termmatcher.similarity("You can pre order", "pre-order") > 75
34