forked from roy-ht/pyter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
12 lines (9 loc) · 668 Bytes
/
test.py
File metadata and controls
12 lines (9 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
# -*- coding:utf-8 -*-
import pyter
def test_same():
s = '''Since the visigoth period, the term Hispania, up until then used geographically, began to be also used with a political connotation, as an example the use of the expression Laus Hispaniae to describe the history of the towns of the peninsula in the chronicles of Isodoro de Sevilla.'''
assert pyter.ter(s.split(), s.split()) == 0
def test_paper():
ref = 'SAUDI ARABIA denied THIS WEEK information published in the AMERICAN new york times'.split()
hyp = 'THIS WEEK THE SAUDIS denied information published in the new york times'.split()
assert 0.3076923076923077 == pyter.ter(hyp, ref)