ots 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. data/README.md +80 -0
  2. data/dictionaries/bg.xml +101 -0
  3. data/dictionaries/ca.xml +141 -0
  4. data/dictionaries/cs.xml +161 -0
  5. data/dictionaries/cy.xml +118 -0
  6. data/dictionaries/da.xml +129 -0
  7. data/dictionaries/de.xml +354 -0
  8. data/dictionaries/el.xml +80 -0
  9. data/dictionaries/en.xml +606 -0
  10. data/dictionaries/eo.xml +171 -0
  11. data/dictionaries/es.xml +369 -0
  12. data/dictionaries/et.xml +172 -0
  13. data/dictionaries/eu.xml +77 -0
  14. data/dictionaries/fi.xml +105 -0
  15. data/dictionaries/fr.xml +199 -0
  16. data/dictionaries/ga.xml +124 -0
  17. data/dictionaries/gl.xml +290 -0
  18. data/dictionaries/he.xml +334 -0
  19. data/dictionaries/hu.xml +280 -0
  20. data/dictionaries/ia.xml +97 -0
  21. data/dictionaries/id.xml +75 -0
  22. data/dictionaries/is.xml +201 -0
  23. data/dictionaries/it.xml +206 -0
  24. data/dictionaries/lv.xml +77 -0
  25. data/dictionaries/mi.xml +76 -0
  26. data/dictionaries/ms.xml +160 -0
  27. data/dictionaries/mt.xml +73 -0
  28. data/dictionaries/nl.xml +245 -0
  29. data/dictionaries/nn.xml +264 -0
  30. data/dictionaries/pl.xml +92 -0
  31. data/dictionaries/pt.xml +365 -0
  32. data/dictionaries/ro.xml +163 -0
  33. data/dictionaries/ru.xml +150 -0
  34. data/dictionaries/sv.xml +255 -0
  35. data/dictionaries/tl.xml +67 -0
  36. data/dictionaries/tr.xml +65 -0
  37. data/dictionaries/uk.xml +98 -0
  38. data/dictionaries/yi.xml +293 -0
  39. data/ext/article.c +119 -0
  40. data/ext/dictionary.c +335 -0
  41. data/ext/extconf.rb +13 -14
  42. data/ext/grader-tc.c +185 -0
  43. data/ext/grader-tc.h +64 -0
  44. data/ext/grader-tf.c +116 -0
  45. data/ext/grader.c +85 -0
  46. data/ext/highlighter.c +128 -0
  47. data/ext/html.c +131 -0
  48. data/ext/libots.h +158 -0
  49. data/ext/ots.c +130 -151
  50. data/ext/ots.h +15 -0
  51. data/ext/parser.c +173 -0
  52. data/ext/relations.c +163 -0
  53. data/ext/stemmer.c +332 -0
  54. data/ext/text.c +98 -0
  55. data/ext/version.h +2 -0
  56. data/ext/wordlist.c +220 -0
  57. data/test/helper.rb +3 -0
  58. data/test/test_article.rb +52 -0
  59. data/test/test_ots.rb +23 -0
  60. metadata +122 -38
  61. data/README +0 -25
  62. data/VERSION +0 -1
  63. data/lib/ots.rb +0 -1
  64. data/test/ots_test.rb +0 -62
@@ -0,0 +1,76 @@
1
+ <?xml version="1.0"?>
2
+ <dictionary lang="english">
3
+ <stemmer>
4
+ <step1_pre>
5
+ <rule>"|</rule>
6
+ <rule>(|</rule>
7
+ </step1_pre>
8
+
9
+
10
+ <step1_post>
11
+ <rule>."|</rule>
12
+ <rule>,"|</rule>
13
+ <rule>.|</rule>
14
+ <rule>,|</rule>
15
+ <rule>"|</rule>
16
+ <rule>)|</rule>
17
+ <rule>?|</rule>
18
+ <rule>:|</rule>
19
+ <rule>;|</rule>
20
+ <rule>!|</rule>
21
+ </step1_post>
22
+
23
+
24
+ <manual>
25
+ <rule>wrote|write</rule>
26
+ <rule>came|come</rule>
27
+ <rule>went|go</rule>
28
+ </manual>
29
+
30
+ <post>
31
+ <rule>before1|1after</rule>
32
+ </post>
33
+ <pre>
34
+ <rule>before1|1after</rule>
35
+ </pre>
36
+ </stemmer>
37
+ <parser>
38
+
39
+ <linebreak>
40
+ <rule>."</rule>
41
+ <rule>?"</rule>
42
+ <rule>!"</rule>
43
+ <rule>,"</rule>
44
+ <rule>.</rule>
45
+ <rule>?</rule>
46
+ <rule>;</rule>
47
+ <rule>|</rule>
48
+ <rule>!</rule>
49
+ </linebreak>
50
+
51
+ <linedontbreak>
52
+ <rule>Dr.</rule>
53
+ <rule>Mr.</rule>
54
+ <rule>Mrs.</rule>
55
+ <rule>U.S.</rule>
56
+ <rule>Rep.</rule>
57
+ <rule>Sen.</rule>
58
+ </linedontbreak>
59
+ </parser>
60
+ <grader-tc>
61
+ <word>ahau</word>
62
+ <word>au</word>
63
+ <word>ia</word>
64
+ <word>koe</word>
65
+ <word>koorua</word>
66
+ <word>koutou</word>
67
+ <word>maatou</word>
68
+ <word>maaua</word>
69
+ <word>ngā</word>
70
+ <word>raatou</word>
71
+ <word>raaua</word>
72
+ <word>taatou</word>
73
+ <word>taaua</word>
74
+ <word>te</word>
75
+ </grader-tc>
76
+ </dictionary>
@@ -0,0 +1,160 @@
1
+ <?xml version="1.0"?>
2
+ <dictionary lang="malay">
3
+ <stemmer>
4
+
5
+ <step1_pre>
6
+ <rule>"|</rule>
7
+ <rule>(|</rule>
8
+ </step1_pre>
9
+
10
+
11
+ <step1_post>
12
+ <rule>."|</rule>
13
+ <rule>,"|</rule>
14
+ <rule>.|</rule>
15
+ <rule>,|</rule>
16
+ <rule>"|</rule>
17
+ <rule>)|</rule>
18
+ <rule>?|</rule>
19
+ <rule>:|</rule>
20
+ <rule>;|</rule>
21
+ <rule>!|</rule>
22
+ </step1_post>
23
+
24
+
25
+ <manual>
26
+ <rule>wrote|write</rule>
27
+ <rule>came|come</rule>
28
+ <rule>went|go</rule>
29
+ </manual>
30
+
31
+ <post>
32
+ <rule>before1|1after</rule>
33
+ </post>
34
+ <pre>
35
+ <rule>before1|1after</rule>
36
+ </pre>
37
+ </stemmer>
38
+ <parser>
39
+
40
+ <linebreak>
41
+ <rule>."</rule>
42
+ <rule>?"</rule>
43
+ <rule>!"</rule>
44
+ <rule>,"</rule>
45
+ <rule>.</rule>
46
+ <rule>?</rule>
47
+ <rule>;</rule>
48
+ <rule>|</rule>
49
+ <rule>!</rule>
50
+ </linebreak>
51
+
52
+ <linedontbreak>
53
+ <rule>Dr.</rule>
54
+ <rule>Mr.</rule>
55
+ <rule>Mrs.</rule>
56
+ <rule>U.S.</rule>
57
+ <rule>Rep.</rule>
58
+ <rule>Sen.</rule>
59
+ </linedontbreak>
60
+ </parser>
61
+ <grader-tc>
62
+ <word>ada</word>
63
+ <word>adakalanya</word>
64
+ <word>adalah</word>
65
+ <word>adapun</word>
66
+ <word>agar</word>
67
+ <word>amin</word>
68
+ <word>anda</word>
69
+ <word>anti</word>
70
+ <word>anu</word>
71
+ <word>apa</word>
72
+ <word>bagaimana</word>
73
+ <word>banyak</word>
74
+ <word>begini</word>
75
+ <word>begitu</word>
76
+ <word>belaka</word>
77
+ <word>beliau</word>
78
+ <word>berapa</word>
79
+ <word>betapa</word>
80
+ <word>bila</word>
81
+ <word>demikian</word>
82
+ <word>dengan</word>
83
+ <word>di</word>
84
+ <word>dia</word>
85
+ <word>dikau</word>
86
+ <word>hingga</word>
87
+ <word>iaitu</word>
88
+ <word>ialah</word>
89
+ <word>jika</word>
90
+ <word>jikalau</word>
91
+ <word>justeru</word>
92
+ <word>kami</word>
93
+ <word>kamu</word>
94
+ <word>kara</word>
95
+ <word>kenapa</word>
96
+ <word>kendati</word>
97
+ <word>kita</word>
98
+ <word>laku</word>
99
+ <word>lepas</word>
100
+ <word>mahupun</word>
101
+ <word>maka</word>
102
+ <word>mana</word>
103
+ <word>mana-mana</word>
104
+ <word>masing-masing</word>
105
+ <word>mereka</word>
106
+ <word>meskipun</word>
107
+ <word>nya</word>
108
+ <word>pada</word>
109
+ <word>paling</word>
110
+ <word>patik</word>
111
+ <word>pergi</word>
112
+ <word>puan</word>
113
+ <word>pula</word>
114
+ <word>saban</word>
115
+ <word>sampai</word>
116
+ <word>sangat</word>
117
+ <word>saudara</word>
118
+ <word>saya</word>
119
+ <word>sebanyak</word>
120
+ <word>sebanyak-banyaknya</word>
121
+ <word>sedang</word>
122
+ <word>segala</word>
123
+ <word>segala-galanya</word>
124
+ <word>sejak</word>
125
+ <word>sekaligus</word>
126
+ <word>sekalipun</word>
127
+ <word>selalu</word>
128
+ <word>semayam</word>
129
+ <word>semesta</word>
130
+ <word>sempena</word>
131
+ <word>semua</word>
132
+ <word>semuanya</word>
133
+ <word>sendiri</word>
134
+ <word>sendiri-sendiri</word>
135
+ <word>sentiasa</word>
136
+ <word>seraya</word>
137
+ <word>serba</word>
138
+ <word>serba aneka</word>
139
+ <word>serba-serbi</word>
140
+ <word>sering</word>
141
+ <word>seringkali</word>
142
+ <word>serta</word>
143
+ <word>siapa</word>
144
+ <word>sini</word>
145
+ <word>supaya</word>
146
+ <word>syahdan</word>
147
+ <word>telah</word>
148
+ <word>terbanyak</word>
149
+ <word>tetapi</word>
150
+ <word>tiada</word>
151
+ <word>tiap</word>
152
+ <word>tidak</word>
153
+ <word>tuanku</word>
154
+ <word>walaupun</word>
155
+ <word>walhal</word>
156
+ <word>walhasil</word>
157
+ <word>wujud</word>
158
+ <word>yang</word>
159
+ </grader-tc>
160
+ </dictionary>
@@ -0,0 +1,73 @@
1
+ <?xml version="1.0"?>
2
+ <dictionary lang="english">
3
+ <stemmer>
4
+ <step1_pre>
5
+ <rule>"|</rule>
6
+ <rule>(|</rule>
7
+ </step1_pre>
8
+
9
+
10
+ <step1_post>
11
+ <rule>."|</rule>
12
+ <rule>,"|</rule>
13
+ <rule>.|</rule>
14
+ <rule>,|</rule>
15
+ <rule>"|</rule>
16
+ <rule>)|</rule>
17
+ <rule>?|</rule>
18
+ <rule>:|</rule>
19
+ <rule>;|</rule>
20
+ <rule>!|</rule>
21
+ </step1_post>
22
+
23
+
24
+ <manual>
25
+ <rule>wrote|write</rule>
26
+ <rule>came|come</rule>
27
+ <rule>went|go</rule>
28
+ </manual>
29
+
30
+ <post>
31
+ <rule>before1|1after</rule>
32
+ </post>
33
+ <pre>
34
+ <rule>before1|1after</rule>
35
+ </pre>
36
+ </stemmer>
37
+ <parser>
38
+
39
+ <linebreak>
40
+ <rule>."</rule>
41
+ <rule>?"</rule>
42
+ <rule>!"</rule>
43
+ <rule>,"</rule>
44
+ <rule>.</rule>
45
+ <rule>?</rule>
46
+ <rule>;</rule>
47
+ <rule>|</rule>
48
+ <rule>!</rule>
49
+ </linebreak>
50
+
51
+ <linedontbreak>
52
+ <rule>Dr.</rule>
53
+ <rule>Mr.</rule>
54
+ <rule>Mrs.</rule>
55
+ <rule>U.S.</rule>
56
+ <rule>Rep.</rule>
57
+ <rule>Sen.</rule>
58
+ </linedontbreak>
59
+ </parser>
60
+ <grader-tc>
61
+ <word>jiena</word>
62
+ <word>aħna</word>
63
+ <word>inti</word>
64
+ <word>iva</word>
65
+ <word>iwa</word>
66
+ <word>le</word>
67
+ <word>mingħajr</word>
68
+ <word>taħt</word>
69
+ <word>wieħed</word>
70
+ <word>tnejn</word>
71
+ <word>għandi</word>
72
+ </grader-tc>
73
+ </dictionary>
@@ -0,0 +1,245 @@
1
+ <?xml version="1.0"?>
2
+ <dictionary lang="dutch">
3
+ <stemmer>
4
+
5
+ <step1_pre>
6
+ <rule>"|</rule>
7
+ <rule>(|</rule>
8
+ </step1_pre>
9
+
10
+
11
+ <step1_post>
12
+ <rule>."|</rule>
13
+ <rule>,"|</rule>
14
+ <rule>.|</rule>
15
+ <rule>,|</rule>
16
+ <rule>"|</rule>
17
+ <rule>)|</rule>
18
+ <rule>?|</rule>
19
+ <rule>:|</rule>
20
+ <rule>;|</rule>
21
+ <rule>!|</rule>
22
+ </step1_post>
23
+
24
+
25
+
26
+ <manual>
27
+ <rule>wrote|write</rule>
28
+ <rule>came|come</rule>
29
+ <rule>went|go</rule>
30
+ </manual>
31
+
32
+ <post>
33
+ <rule>before1|1after</rule>
34
+ </post>
35
+ <pre>
36
+ <rule>before1|1after</rule>
37
+ </pre>
38
+
39
+
40
+ <manual>
41
+ <rule>wrote|write</rule>
42
+ </manual>
43
+
44
+ <synonyms>
45
+ <rule>assist|help</rule>
46
+ </synonyms>
47
+
48
+ </stemmer>
49
+ <parser>
50
+ <linebreak>
51
+ <rule>."</rule>
52
+ <rule>?"</rule>
53
+ <rule>!"</rule>
54
+ <rule>,"</rule>
55
+ <rule>.</rule>
56
+ <rule>?</rule>
57
+ <rule>;</rule>
58
+ <rule>|</rule>
59
+ <rule>!</rule>
60
+ </linebreak>
61
+
62
+ <linedontbreak>
63
+ <rule>Dr.</rule>
64
+ <rule>Mr.</rule>
65
+ <rule>Mrs.</rule>
66
+ <rule>U.S.</rule>
67
+ <rule>Rep.</rule>
68
+ <rule>Sen.</rule>
69
+ </linedontbreak>
70
+ </parser>
71
+ <grader-tc>
72
+ <word>000</word>
73
+ <word>aan</word>
74
+ <word>achter</word>
75
+ <word>af</word>
76
+ <word>al</word>
77
+ <word>als</word>
78
+ <word>altijd</word>
79
+ <word>andere</word>
80
+ <word>anders</word>
81
+ <word>ben</word>
82
+ <word>bent</word>
83
+ <word>bij</word>
84
+ <word>boven</word>
85
+ <word>bovendien</word>
86
+ <word>daar</word>
87
+ <word>daarom</word>
88
+ <word>dan</word>
89
+ <word>dat</word>
90
+ <word>de</word>
91
+ <word>deed</word>
92
+ <word>desondanks</word>
93
+ <word>deze</word>
94
+ <word>die</word>
95
+ <word>dit</word>
96
+ <word>doe</word>
97
+ <word>doen</word>
98
+ <word>door</word>
99
+ <word>dus</word>
100
+ <word>echter</word>
101
+ <word>een</word>
102
+ <word>één</word>
103
+ <word>en</word>
104
+ <word>er</word>
105
+ <word>ga</word>
106
+ <word>gaan</word>
107
+ <word>gaat</word>
108
+ <word>geen</word>
109
+ <word>gekund</word>
110
+ <word>genoeg</word>
111
+ <word>gij</word>
112
+ <word>ging</word>
113
+ <word>gisteren</word>
114
+ <word>haar</word>
115
+ <word>had</word>
116
+ <word>hadden</word>
117
+ <word>hare</word>
118
+ <word>heb</word>
119
+ <word>hebben</word>
120
+ <word>heeft</word>
121
+ <word>hem</word>
122
+ <word>hen</word>
123
+ <word>het</word>
124
+ <word>hier</word>
125
+ <word>hij</word>
126
+ <word>hoe</word>
127
+ <word>hoeveel</word>
128
+ <word>hoewel</word>
129
+ <word>hun</word>
130
+ <word>hunne</word>
131
+ <word>ik</word>
132
+ <word>in</word>
133
+ <word>is</word>
134
+ <word>ja</word>
135
+ <word>je</word>
136
+ <word>jij</word>
137
+ <word>jou</word>
138
+ <word>jouw</word>
139
+ <word>jouwe</word>
140
+ <word>jullie</word>
141
+ <word>kan</word>
142
+ <word>kom</word>
143
+ <word>komen</word>
144
+ <word>komt</word>
145
+ <word>kon</word>
146
+ <word>konden</word>
147
+ <word>kun</word>
148
+ <word>kunnen</word>
149
+ <word>kunt</word>
150
+ <word>kwam</word>
151
+ <word>langs</word>
152
+ <word>maak</word>
153
+ <word>maakt</word>
154
+ <word>maakte</word>
155
+ <word>maar</word>
156
+ <word>maken</word>
157
+ <word>me</word>
158
+ <word>meer</word>
159
+ <word>meest</word>
160
+ <word>meestal</word>
161
+ <word>met</word>
162
+ <word>mij</word>
163
+ <word>mijn</word>
164
+ <word>mijne</word>
165
+ <word>minstens</word>
166
+ <word>moeten</word>
167
+ <word>mogen</word>
168
+ <word>morgen</word>
169
+ <word>na</word>
170
+ <word>naar</word>
171
+ <word>naast</word>
172
+ <word>natuurlijk</word>
173
+ <word>neen</word>
174
+ <word>nergens</word>
175
+ <word>niet</word>
176
+ <word>nog</word>
177
+ <word>nogal</word>
178
+ <word>nooit</word>
179
+ <word>noord</word>
180
+ <word>nu</word>
181
+ <word>of</word>
182
+ <word>om</word>
183
+ <word>omdat</word>
184
+ <word>onder</word>
185
+ <word>ons</word>
186
+ <word>onze</word>
187
+ <word>ooit</word>
188
+ <word>ook</word>
189
+ <word>op</word>
190
+ <word>over</word>
191
+ <word>overal</word>
192
+ <word>soms</word>
193
+ <word>steeds</word>
194
+ <word>straks</word>
195
+ <word>te</word>
196
+ <word>tegen</word>
197
+ <word>terug</word>
198
+ <word>toe</word>
199
+ <word>tot</word>
200
+ <word>tussen</word>
201
+ <word>u</word>
202
+ <word>uit</word>
203
+ <word>uw</word>
204
+ <word>uwe</word>
205
+ <word>van</word>
206
+ <word>veel</word>
207
+ <word>vind</word>
208
+ <word>vinden</word>
209
+ <word>vindt</word>
210
+ <word>voor</word>
211
+ <word>vooral</word>
212
+ <word>vrijwel</word>
213
+ <word>waar</word>
214
+ <word>waarom</word>
215
+ <word>waarop</word>
216
+ <word>want</word>
217
+ <word>waren</word>
218
+ <word>was</word>
219
+ <word>wat</word>
220
+ <word>we</word>
221
+ <word>weer</word>
222
+ <word>wees</word>
223
+ <word>weest</word>
224
+ <word>wel</word>
225
+ <word>wie</word>
226
+ <word>wij</word>
227
+ <word>word</word>
228
+ <word>worden</word>
229
+ <word>wordt</word>
230
+ <word>zal</word>
231
+ <word>ze</word>
232
+ <word>zelf</word>
233
+ <word>zich</word>
234
+ <word>zij</word>
235
+ <word>zijn</word>
236
+ <word>zijne</word>
237
+ <word>zo</word>
238
+ <word>zonder</word>
239
+ <word>zou</word>
240
+ <word>zouden</word>
241
+ <word>zoveel</word>
242
+ <word>zullen</word>
243
+ <word>zult</word>
244
+ </grader-tc>
245
+ </dictionary>