-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtests.py
138 lines (94 loc) · 4.08 KB
/
tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from teanglann import get_teanglann_definition, assign_plural_genitive
if __name__ == '__main__':
# TODO: these are not actually formal tests yet
# adverb/preposition/adverb in a single entry
get_teanglann_definition('anall')
# make sure to pick up the 'Adjective'
get_teanglann_definition('buan')
# no adjective number defined in the main tab (TODO get from /fb/ tab)
get_teanglann_definition('deas')
# should have only one line with 'article'
get_teanglann_definition('alt')
# testing male/female:
get_teanglann_definition('dóid')
get_teanglann_definition('dogma')
# should be nm4 not nm3 or multiple declensions:
get_teanglann_definition('trumpa')
# get back 'that'
get_teanglann_definition('siúd')
# has entry pointing to DUGA
get_teanglann_definition('doic')
# don't have 2 lines both saying 'knight'
get_teanglann_definition('ridire')
# no entry in fb (for noun declension)
get_teanglann_definition('dóideog')
# some monsters of definitions including verb & noun
get_teanglann_definition('dóigh')
get_teanglann_definition('súil')
# has a non-translated '1. Dim. of BOTH.' in output
get_teanglann_definition('bothán')
# get a verbal noun
# also an example with 5.(a), 5.(b) etc.
# also an example with multiple class="trans" in 6.
get_teanglann_definition('imeacht')
# get more than 1 page of results (check if 'permission' is there)
get_teanglann_definition('cead')
# '(formal) application' to match with 'application'
get_teanglann_definition('iarratas')
# was not getting a1 -> adjective here
# ensure don't get 'persist'
# ('persistent' is in teanglann, 'persisting' is in focloir)
get_teanglann_definition('leanúnach')
# get '(proper) condition'
get_teanglann_definition('bail')
# get 'exact (measure, position)'
# instead of 'exact (measure; exact position)'
get_teanglann_definition('beacht')
# some complex abbreviations here
get_teanglann_definition('dírigh')
# get 'volunteer (military)'
get_teanglann_definition('óglach')
# get 'warp (textiles)'
get_teanglann_definition('dlúth')
# TODO: get 'to illustrate'
get_teanglann_definition('maisigh')
# 'na gleonna' for plural
assign_plural_genitive('gleo')
# verb intransitive + transitive,
# with extra entry with intransitive verb only
# expecting to get 'Verb - Transitive & Intransitive' back
get_teanglann_definition('lonnaigh')[0]
# not getting 'cream'
get_teanglann_definition('uachtar')
# different senses king/forearm with nf4/nm4
get_teanglann_definition('rí')
# noun, but adjective there also (not currently picking that up
get_teanglann_definition('indiach')
# an tEorpach/na hEorpaigh & an Eorpaigh/na nEorpach
get_teanglann_definition('indiach')
# an t-ionsaí/an ionsaithe & na hionsaithe/na n-ionsaithe
get_teanglann_definition('ionsaí')
# one noun (nf) and one verb, verb should not include types['Noun']=nm
get_teanglann_definition('béic')
if False:
# testcases for populate_meta (shouldn't be under get_teanglann_definition)
# update GenitiveVN even though there was no AUTO results
get_teanglann_definition('gné')
# should only be a single unified plural/genitive
get_teanglann_definition('aird')
# bad markup; double '(gs. (gs.'
get_teanglann_definition('colúnaí')
# no definition, still want to pull back Noun variants
get_teanglann_definition('meangadh')
# separate senses with separate genitivevn ('journal' has irisí as plural but 'belief' does not)
get_teanglann_definition('iris')
# don't use variant plural breitheamhain
assign_plural_genitive('breitheamh')
# 'half' definition is in a 'II' class="subentry"
get_teanglann_definition('leath')
# defined as Adjective only in sense 1.
get_teanglann_definition('suntasach')
# don't fill in Noun details for Verb sense
get_teanglann_definition('bolg')