lingo 1.8.6 → 1.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +40 -4
- data/README +22 -51
- data/Rakefile +3 -17
- data/config/lingo.cfg +24 -15
- data/config/lir.cfg +25 -16
- data/dict/de/test_muh.txt +6 -0
- data/dict/en/lingo-dic.txt +2 -3
- data/lang/de.lang +10 -9
- data/lang/en.lang +1 -1
- data/lib/lingo.rb +4 -4
- data/lib/lingo/attendee.rb +27 -7
- data/lib/lingo/attendee/analysis_filter.rb +81 -0
- data/lib/lingo/attendee/debug_filter.rb +42 -0
- data/lib/lingo/attendee/debugger.rb +2 -11
- data/lib/lingo/attendee/decomposer.rb +6 -3
- data/lib/lingo/attendee/formatter.rb +6 -6
- data/lib/lingo/attendee/hal_filter.rb +94 -0
- data/lib/lingo/attendee/lsi_filter.rb +99 -0
- data/lib/lingo/attendee/multi_worder.rb +69 -43
- data/lib/lingo/attendee/sequencer.rb +32 -19
- data/lib/lingo/attendee/synonymer.rb +2 -2
- data/lib/lingo/attendee/text_reader.rb +63 -92
- data/lib/lingo/attendee/text_writer.rb +12 -21
- data/lib/lingo/attendee/tokenizer.rb +32 -21
- data/lib/lingo/attendee/variator.rb +3 -3
- data/lib/lingo/attendee/vector_filter.rb +7 -9
- data/lib/lingo/attendee/word_searcher.rb +3 -3
- data/lib/lingo/buffered_attendee.rb +3 -36
- data/lib/lingo/config.rb +1 -1
- data/lib/lingo/ctl.rb +7 -155
- data/lib/lingo/ctl/analysis.rb +136 -0
- data/lib/lingo/ctl/files.rb +86 -0
- data/lib/lingo/ctl/other.rb +140 -0
- data/lib/lingo/database.rb +64 -60
- data/lib/lingo/database/crypter.rb +7 -5
- data/lib/lingo/error.rb +5 -4
- data/lib/lingo/language.rb +13 -5
- data/lib/lingo/language/grammar.rb +13 -7
- data/lib/lingo/language/token.rb +6 -0
- data/lib/lingo/language/word.rb +23 -36
- data/lib/lingo/language/word_form.rb +5 -1
- data/lib/lingo/srv.rb +2 -2
- data/lib/lingo/text_utils.rb +96 -0
- data/lib/lingo/version.rb +1 -1
- data/lib/lingo/web/views/index.erb +1 -1
- data/test/attendee/ts_decomposer.rb +23 -5
- data/test/attendee/ts_multi_worder.rb +66 -0
- data/test/attendee/ts_sequencer.rb +28 -4
- data/test/attendee/ts_text_reader.rb +20 -0
- data/test/attendee/ts_tokenizer.rb +20 -0
- data/test/attendee/ts_variator.rb +1 -1
- data/test/attendee/ts_word_searcher.rb +39 -3
- data/test/lir3.txt +12 -0
- data/test/ref/artikel.non +1 -12
- data/test/ref/artikel.seq +3 -1
- data/test/ref/artikel.vec +1 -0
- data/test/ref/artikel.vef +35 -34
- data/test/ref/artikel.ven +8 -7
- data/test/ref/artikel.ver +34 -33
- data/test/ref/artikel.vet +2573 -2563
- data/test/ref/lir.non +77 -78
- data/test/ref/lir.seq +9 -7
- data/test/ref/lir.syn +1 -1
- data/test/ref/lir.vec +41 -41
- data/test/ref/lir.vef +210 -210
- data/test/ref/lir.ven +46 -46
- data/test/ref/lir.ver +72 -72
- data/test/ref/lir.vet +329 -329
- data/test/ts_database.rb +166 -62
- data/test/ts_language.rb +23 -23
- metadata +53 -34
- data/lib/lingo/attendee/dehyphenizer.rb +0 -120
- data/lib/lingo/attendee/noneword_filter.rb +0 -115
- data/test/attendee/ts_noneword_filter.rb +0 -15
data/test/ts_database.rb
CHANGED
@@ -39,6 +39,7 @@ wort mist
|
|
39
39
|
alt bibliothekskatalog
|
40
40
|
neu bibliothekskatalög
|
41
41
|
neu alttitelkatalog
|
42
|
+
episch dichtung der höfisch zeit
|
42
43
|
EOT
|
43
44
|
|
44
45
|
@keyvalue = <<-EOT
|
@@ -141,25 +142,27 @@ Wort2=
|
|
141
142
|
),
|
142
143
|
'inflect' => true
|
143
144
|
}, @singleword_inflect, {
|
144
|
-
'wort1'
|
145
|
-
'wort2'
|
146
|
-
'juristisch person'
|
147
|
-
'natürlich person'
|
148
|
-
'natürlich quatsch'
|
149
|
-
'lang essay'
|
150
|
-
'groß kiefer'
|
151
|
-
'klug abel'
|
152
|
-
'warm abendluft'
|
153
|
-
'klar abendluft'
|
154
|
-
'gut abitur'
|
155
|
-
'gut abitur schaff'
|
156
|
-
'ein gut abitur'
|
157
|
-
'schmal rund zylinder'
|
158
|
-
'der schmal zylinder'
|
159
|
-
'wort mist'
|
160
|
-
'alt bibliothekskatalog'
|
161
|
-
'neu bibliothekskatalög'
|
162
|
-
'neu alttitelkatalog'
|
145
|
+
'wort1' => 'wort1#s',
|
146
|
+
'wort2' => 'wort2#s',
|
147
|
+
'juristisch person' => 'juristische person#s',
|
148
|
+
'natürlich person' => 'natürliche personen#s',
|
149
|
+
'natürlich quatsch' => 'natürlichen quatsches#s',
|
150
|
+
'lang essay' => 'langer essay#s',
|
151
|
+
'groß kiefer' => 'große kiefer#s',
|
152
|
+
'klug abel' => 'kluger abel#s',
|
153
|
+
'warm abendluft' => 'warme abendluft#s',
|
154
|
+
'klar abendluft' => 'klare abendluft#s',
|
155
|
+
'gut abitur' => 'gutes abitur#s',
|
156
|
+
'gut abitur schaff' => 'gutes abitur schaffen#s',
|
157
|
+
'ein gut abitur' => 'ein gut abitur#s',
|
158
|
+
'schmal rund zylinder' => 'schmaler runder zylinder#s',
|
159
|
+
'der schmal zylinder' => 'der schmal zylinder#s',
|
160
|
+
'wort mist' => 'wort mist#s',
|
161
|
+
'alt bibliothekskatalog' => 'alter bibliothekskatalog#s',
|
162
|
+
'neu bibliothekskatalög' => 'neu bibliothekskatalög#s',
|
163
|
+
'neu alttitelkatalog' => 'neuer alttitelkatalog#s',
|
164
|
+
'episch dichtung der' => '*5',
|
165
|
+
'episch dichtung der höfisch zeit' => 'epische dichtung der höfisch zeit#s'
|
163
166
|
})
|
164
167
|
end
|
165
168
|
|
@@ -173,25 +176,27 @@ Wort2=
|
|
173
176
|
),
|
174
177
|
'inflect' => 's'
|
175
178
|
}, @singleword_inflect, {
|
176
|
-
'wort1'
|
177
|
-
'wort2'
|
178
|
-
'juristisch person'
|
179
|
-
'natürlich person'
|
180
|
-
'natürlich quatsch'
|
181
|
-
'lang essay'
|
182
|
-
'groß kiefer'
|
183
|
-
'klug abel'
|
184
|
-
'warm abendluft'
|
185
|
-
'klar abendluft'
|
186
|
-
'gut abitur'
|
187
|
-
'gut abitur schaff'
|
188
|
-
'ein gut abitur'
|
189
|
-
'schmal rund zylinder'
|
190
|
-
'der schmal zylinder'
|
191
|
-
'wort mist'
|
192
|
-
'alt bibliothekskatalog'
|
193
|
-
'neu bibliothekskatalög'
|
194
|
-
'neu alttitelkatalog'
|
179
|
+
'wort1' => 'wort1#s',
|
180
|
+
'wort2' => 'wort2#s',
|
181
|
+
'juristisch person' => 'juristische person#s',
|
182
|
+
'natürlich person' => 'natürliche personen#s',
|
183
|
+
'natürlich quatsch' => 'natürlichen quatsches#s',
|
184
|
+
'lang essay' => 'langer essay#s',
|
185
|
+
'groß kiefer' => 'große kiefer#s',
|
186
|
+
'klug abel' => 'klug abel#s',
|
187
|
+
'warm abendluft' => 'warme abendluft#s',
|
188
|
+
'klar abendluft' => 'klare abendluft#s',
|
189
|
+
'gut abitur' => 'gutes abitur#s',
|
190
|
+
'gut abitur schaff' => 'gutes abitur schaffen#s',
|
191
|
+
'ein gut abitur' => 'ein gut abitur#s',
|
192
|
+
'schmal rund zylinder' => 'schmaler runder zylinder#s',
|
193
|
+
'der schmal zylinder' => 'der schmal zylinder#s',
|
194
|
+
'wort mist' => 'wort mist#s',
|
195
|
+
'alt bibliothekskatalog' => 'alter bibliothekskatalog#s',
|
196
|
+
'neu bibliothekskatalög' => 'neu bibliothekskatalög#s',
|
197
|
+
'neu alttitelkatalog' => 'neuer alttitelkatalog#s',
|
198
|
+
'episch dichtung der' => '*5',
|
199
|
+
'episch dichtung der höfisch zeit' => 'epische dichtung der höfisch zeit#s'
|
195
200
|
})
|
196
201
|
end
|
197
202
|
|
@@ -205,25 +210,124 @@ Wort2=
|
|
205
210
|
),
|
206
211
|
'inflect' => 'e'
|
207
212
|
}, @singleword_inflect, {
|
213
|
+
'wort1' => 'wort1#s',
|
214
|
+
'wort2' => 'wort2#s',
|
215
|
+
'juristisch person' => 'juristisch person#s',
|
216
|
+
'natürlich person' => 'natürliche personen#s',
|
217
|
+
'natürlich quatsch' => 'natürlichen quatsches#s',
|
218
|
+
'lang essay' => 'lang essay#s',
|
219
|
+
'klug abel' => 'kluger abel#s',
|
220
|
+
'groß kiefer' => 'große kiefer#s',
|
221
|
+
'warm abendluft' => 'warm abendluft#s',
|
222
|
+
'klar abendluft' => 'klar abendluft#s',
|
223
|
+
'gut abitur' => 'gut abitur#s',
|
224
|
+
'gut abitur schaff' => 'gut abitur schaffen#s',
|
225
|
+
'ein gut abitur' => 'ein gut abitur#s',
|
226
|
+
'schmal rund zylinder' => 'schmal rund zylinder#s',
|
227
|
+
'der schmal zylinder' => 'der schmal zylinder#s',
|
228
|
+
'wort mist' => 'wort mist#s',
|
229
|
+
'alt bibliothekskatalog' => 'alt bibliothekskatalog#s',
|
230
|
+
'neu bibliothekskatalög' => 'neu bibliothekskatalög#s',
|
231
|
+
'neu alttitelkatalog' => 'neu alttitelkatalog#s',
|
232
|
+
'episch dichtung der' => '*5',
|
233
|
+
'episch dichtung der höfisch zeit' => 'episch dichtung der höfisch zeit#s'
|
234
|
+
})
|
235
|
+
end
|
236
|
+
|
237
|
+
def test_singleword_hyphenate
|
238
|
+
compare({
|
239
|
+
'txt-format' => 'SingleWord',
|
240
|
+
'use-lex' => set_config('lex',
|
241
|
+
'name' => 'de/lingo-dic.txt',
|
242
|
+
'txt-format' => 'WordClass',
|
243
|
+
'separator' => '='
|
244
|
+
),
|
245
|
+
'hyphenate' => true
|
246
|
+
}, @singleword, {
|
208
247
|
'wort1' => 'wort1#s',
|
209
248
|
'wort2' => 'wort2#s',
|
210
|
-
'
|
211
|
-
'
|
212
|
-
'
|
213
|
-
'
|
214
|
-
'
|
215
|
-
'
|
216
|
-
'
|
217
|
-
'
|
218
|
-
'
|
219
|
-
'
|
220
|
-
'
|
221
|
-
'
|
222
|
-
'
|
223
|
-
'
|
224
|
-
'
|
225
|
-
'
|
226
|
-
'
|
249
|
+
'ganz groß und blöd mist' => 'ganz großer und blöder mist#s',
|
250
|
+
'ganz groß und blöd-mist' => 'ganz großer und blöder mist#s',
|
251
|
+
'ganz groß und-blöd mist' => 'ganz großer und blöder mist#s',
|
252
|
+
'ganz groß und-blöd-mist' => 'ganz großer und blöder mist#s',
|
253
|
+
'ganz groß-und blöd mist' => 'ganz großer und blöder mist#s',
|
254
|
+
'ganz groß-und blöd-mist' => 'ganz großer und blöder mist#s',
|
255
|
+
'ganz groß-und-blöd mist' => 'ganz großer und blöder mist#s',
|
256
|
+
'ganz groß-und-blöd-mist' => 'ganz großer und blöder mist#s',
|
257
|
+
'ganz-groß und blöd mist' => 'ganz großer und blöder mist#s',
|
258
|
+
'ganz-groß und blöd-mist' => 'ganz großer und blöder mist#s',
|
259
|
+
'ganz-groß und-blöd mist' => 'ganz großer und blöder mist#s',
|
260
|
+
'ganz-groß und-blöd-mist' => 'ganz großer und blöder mist#s',
|
261
|
+
'ganz-groß-und blöd mist' => 'ganz großer und blöder mist#s',
|
262
|
+
'ganz-groß-und blöd-mist' => 'ganz großer und blöder mist#s',
|
263
|
+
'ganz-groß-und-blöd mist' => 'ganz großer und blöder mist#s',
|
264
|
+
'juristisch person' => 'juristische personen#s',
|
265
|
+
'hoch schnell weit' => 'höher schneller weiter#s|*4',
|
266
|
+
'hoch schnell-weit' => 'höher schneller weiter#s',
|
267
|
+
'hoch-schnell weit' => 'höher schneller weiter#s',
|
268
|
+
'ganz groß und blöd quatsch' => 'ganz großer und blöder quatsch#s',
|
269
|
+
'ganz groß und blöd-quatsch' => 'ganz großer und blöder quatsch#s',
|
270
|
+
'ganz groß und-blöd quatsch' => 'ganz großer und blöder quatsch#s',
|
271
|
+
'ganz groß und-blöd-quatsch' => 'ganz großer und blöder quatsch#s',
|
272
|
+
'ganz groß-und blöd quatsch' => 'ganz großer und blöder quatsch#s',
|
273
|
+
'ganz groß-und blöd-quatsch' => 'ganz großer und blöder quatsch#s',
|
274
|
+
'ganz groß-und-blöd quatsch' => 'ganz großer und blöder quatsch#s',
|
275
|
+
'ganz groß-und-blöd-quatsch' => 'ganz großer und blöder quatsch#s',
|
276
|
+
'ganz-groß und blöd quatsch' => 'ganz großer und blöder quatsch#s',
|
277
|
+
'ganz-groß und blöd-quatsch' => 'ganz großer und blöder quatsch#s',
|
278
|
+
'ganz-groß und-blöd quatsch' => 'ganz großer und blöder quatsch#s',
|
279
|
+
'ganz-groß und-blöd-quatsch' => 'ganz großer und blöder quatsch#s',
|
280
|
+
'ganz-groß-und blöd quatsch' => 'ganz großer und blöder quatsch#s',
|
281
|
+
'ganz-groß-und blöd-quatsch' => 'ganz großer und blöder quatsch#s',
|
282
|
+
'ganz-groß-und-blöd quatsch' => 'ganz großer und blöder quatsch#s',
|
283
|
+
'hoch schnell weit groß' => 'höher schneller weiter größer#s',
|
284
|
+
'hoch schnell weit-groß' => 'höher schneller weiter größer#s',
|
285
|
+
'hoch schnell-weit groß' => 'höher schneller weiter größer#s',
|
286
|
+
'hoch schnell-weit-groß' => 'höher schneller weiter größer#s',
|
287
|
+
'hoch-schnell weit groß' => 'höher schneller weiter größer#s',
|
288
|
+
'hoch-schnell weit-groß' => 'höher schneller weiter größer#s',
|
289
|
+
'hoch-schnell-weit groß' => 'höher schneller weiter größer#s',
|
290
|
+
'ganz groß und blöd schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
291
|
+
'ganz groß und blöd schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
292
|
+
'ganz groß und blöd-schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
293
|
+
'ganz groß und blöd-schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
294
|
+
'ganz groß und-blöd schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
295
|
+
'ganz groß und-blöd schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
296
|
+
'ganz groß und-blöd-schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
297
|
+
'ganz groß und-blöd-schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
298
|
+
'ganz groß-und blöd schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
299
|
+
'ganz groß-und blöd schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
300
|
+
'ganz groß-und blöd-schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
301
|
+
'ganz groß-und blöd-schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
302
|
+
'ganz groß-und-blöd schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
303
|
+
'ganz groß-und-blöd schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
304
|
+
'ganz groß-und-blöd-schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
305
|
+
'ganz groß-und-blöd-schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
306
|
+
'ganz-groß und blöd schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
307
|
+
'ganz-groß und blöd schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
308
|
+
'ganz-groß und blöd-schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
309
|
+
'ganz-groß und blöd-schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
310
|
+
'ganz-groß und-blöd schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
311
|
+
'ganz-groß und-blöd schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
312
|
+
'ganz-groß und-blöd-schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
313
|
+
'ganz-groß und-blöd-schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
314
|
+
'ganz-groß-und blöd schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
315
|
+
'ganz-groß-und blöd schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
316
|
+
'ganz-groß-und blöd-schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
317
|
+
'ganz-groß-und blöd-schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
318
|
+
'ganz-groß-und-blöd schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
319
|
+
'ganz-groß-und-blöd schwach-sinn' => 'ganz großer und blöder schwach sinn#s',
|
320
|
+
'ganz-groß-und-blöd-schwach sinn' => 'ganz großer und blöder schwach sinn#s',
|
321
|
+
'ganz groß und' => '*4|*5|*6',
|
322
|
+
'ganz groß und-blöd' => '*4|*5',
|
323
|
+
'ganz groß und-blöd-schwach' => '*4',
|
324
|
+
'ganz groß-und blöd' => '*4|*5',
|
325
|
+
'ganz groß-und blöd-schwach' => '*4',
|
326
|
+
'ganz groß-und-blöd schwach' => '*4',
|
327
|
+
'ganz-groß und blöd' => '*4|*5',
|
328
|
+
'ganz-groß und blöd-schwach' => '*4',
|
329
|
+
'ganz-groß und-blöd schwach' => '*4',
|
330
|
+
'ganz-groß-und blöd schwach' => '*4'
|
227
331
|
})
|
228
332
|
end
|
229
333
|
|
@@ -381,13 +485,13 @@ Wort2=
|
|
381
485
|
FileUtils.mkdir_p(File.dirname(TEST_FILE))
|
382
486
|
File.open(TEST_FILE, 'w', encoding: Lingo::ENC) { |f| f.write(input) }
|
383
487
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
488
|
+
id, err = set_config('tst', config.merge('name' => TEST_FILE)), nil
|
489
|
+
|
490
|
+
Lingo::Database.open(id, @lingo) { |db| begin
|
491
|
+
block_given? ? yield(db) : assert_equal(output, db.to_h
|
492
|
+
.tap { |h| h.delete(Lingo::Database::SYS_KEY) }); rescue => err; end }
|
493
|
+
|
494
|
+
raise err if err
|
391
495
|
ensure
|
392
496
|
cleanup_store
|
393
497
|
end
|
data/test/ts_language.rb
CHANGED
@@ -227,15 +227,15 @@ class TestGrammar < LingoTestCase
|
|
227
227
|
def test_cache
|
228
228
|
lg { |gra|
|
229
229
|
assert_equal(
|
230
|
-
wd('informationswissenschaften|
|
230
|
+
wd('informationswissenschaften|COM', 'informationswissenschaft|k', 'information|s+', 'wissenschaft|s+'),
|
231
231
|
gra.find_compound('informationswissenschaften')
|
232
232
|
)
|
233
233
|
assert_equal(
|
234
|
-
wd('informationswissenschaften|
|
234
|
+
wd('informationswissenschaften|COM', 'informationswissenschaft|k', 'information|s+', 'wissenschaft|s+'),
|
235
235
|
gra.find_compound('informationswissenschaften')
|
236
236
|
)
|
237
237
|
assert_equal(
|
238
|
-
wd('informationswissenschaften|
|
238
|
+
wd('informationswissenschaften|COM', 'informationswissenschaft|k', 'information|s+', 'wissenschaft|s+'),
|
239
239
|
gra.find_compound('informationswissenschaften')
|
240
240
|
)
|
241
241
|
}
|
@@ -244,97 +244,97 @@ class TestGrammar < LingoTestCase
|
|
244
244
|
def test_find_compound
|
245
245
|
lg { |gra|
|
246
246
|
assert_equal(
|
247
|
-
wd('informationswissenschaften|
|
247
|
+
wd('informationswissenschaften|COM', 'informationswissenschaft|k', 'information|s+', 'wissenschaft|s+'),
|
248
248
|
gra.find_compound('informationswissenschaften')
|
249
249
|
)
|
250
250
|
|
251
251
|
assert_equal(
|
252
|
-
wd('cd-rom-technologie|
|
252
|
+
wd('cd-rom-technologie|COM', 'cd-rom-technologie|k', 'cd-rom|s+|f', 'cd-rom|s+|m', 'technologie|s+|f'),
|
253
253
|
gra.find_compound('cd-rom-technologie')
|
254
254
|
)
|
255
255
|
|
256
256
|
assert_equal(
|
257
|
-
wd('albert-ludwigs-universität|
|
257
|
+
wd('albert-ludwigs-universität|COM', 'albert-ludwigs-universität|k', 'albert|e+', 'ludwig|e+', 'universität|s+'),
|
258
258
|
gra.find_compound('albert-ludwigs-universität')
|
259
259
|
)
|
260
260
|
|
261
261
|
assert_equal(
|
262
|
-
wd('client-server-system|
|
262
|
+
wd('client-server-system|COM', 'client-server-system|k', 'client|s+', 'server|s+', 'system|s+'),
|
263
263
|
gra.find_compound('client-server-system')
|
264
264
|
)
|
265
265
|
|
266
266
|
assert_equal(
|
267
|
-
wd('benutzerforschung|
|
267
|
+
wd('benutzerforschung|COM', 'benutzerforschung|k', 'benutzer|s+', 'forschung|s+'),
|
268
268
|
gra.find_compound('benutzerforschung')
|
269
269
|
)
|
270
270
|
|
271
271
|
assert_equal(
|
272
|
-
wd('clustersuche|
|
272
|
+
wd('clustersuche|COM', 'clustersuche|k', 'cluster|s+', 'suche|s+', 'suchen|v+'),
|
273
273
|
gra.find_compound('clustersuche')
|
274
274
|
)
|
275
275
|
|
276
276
|
assert_equal(
|
277
|
-
wd('titelkatalogstitel|
|
277
|
+
wd('titelkatalogstitel|COM', 'titelkatalogstitel|k', 'titel|s+', 'katalog|s+', 'titel|s+'),
|
278
278
|
gra.find_compound('titelkatalogstitel')
|
279
279
|
)
|
280
280
|
|
281
281
|
assert_equal(
|
282
|
-
wd('titelkatalogstiteltitel|
|
282
|
+
wd('titelkatalogstiteltitel|COM', 'titelkatalogstiteltitel|k', 'titel|s+', 'katalog|s+', 'titel|s+', 'titel|s+'),
|
283
283
|
gra.find_compound('titelkatalogstiteltitel')
|
284
284
|
)
|
285
285
|
|
286
286
|
assert_equal(
|
287
|
-
wd('titelbestandsbestände|
|
287
|
+
wd('titelbestandsbestände|COM', 'titelbestandsbestand|k', 'titel|s+', 'bestand|s+', 'bestand|s+', 'bestehen|v+'),
|
288
288
|
gra.find_compound('titelbestandsbestände')
|
289
289
|
)
|
290
290
|
|
291
291
|
assert_equal(
|
292
|
-
wd('hasenbraten|
|
292
|
+
wd('hasenbraten|COM', 'hasenbraten|k', 'hase|s+', 'braten|v+'),
|
293
293
|
gra.find_compound('hasenbraten')
|
294
294
|
)
|
295
295
|
|
296
296
|
assert_equal(
|
297
|
-
wd('nasenlaufen|
|
297
|
+
wd('nasenlaufen|COM', 'nasenlaufen|k', 'nase|s+', 'laufen|v+'),
|
298
298
|
gra.find_compound('nasenlaufen')
|
299
299
|
)
|
300
300
|
|
301
301
|
assert_equal(
|
302
|
-
wd('nasenlaufens|
|
302
|
+
wd('nasenlaufens|COM', 'nasenlaufen|k', 'nase|s+', 'laufen|v+'),
|
303
303
|
gra.find_compound('nasenlaufens')
|
304
304
|
)
|
305
305
|
|
306
306
|
assert_equal(
|
307
|
-
wd('arrafat-nachfolgebedarf|
|
307
|
+
wd('arrafat-nachfolgebedarf|COM', 'arrafat-nachfolgebedarf|k', 'arrafat|x+', 'nachfolge|s+', 'bedarf|s+'),
|
308
308
|
gra.find_compound('arrafat-nachfolgebedarf')
|
309
309
|
)
|
310
310
|
|
311
311
|
assert_equal(
|
312
|
-
wd('nachfolge-arrafat|
|
312
|
+
wd('nachfolge-arrafat|COM', 'nachfolge-arrafat|k', 'nachfolge|s+', 'arrafat|x+'),
|
313
313
|
gra.find_compound('nachfolge-arrafat')
|
314
314
|
)
|
315
315
|
|
316
316
|
assert_equal(
|
317
|
-
wd('morgenonkelmantel|
|
317
|
+
wd('morgenonkelmantel|COM', 'morgenonkelmantel|k', 'morgen|w+', 'morgen|s+', 'onkel|s+', 'mantel|s+'),
|
318
318
|
gra.find_compound('morgenonkelmantel')
|
319
319
|
)
|
320
320
|
|
321
321
|
assert_equal(
|
322
|
-
wd('arrafat-nachfolger|
|
322
|
+
wd('arrafat-nachfolger|COM', 'arrafat-nachfolger|k', 'arrafat|x+', 'nachfolger|s+'),
|
323
323
|
gra.find_compound('arrafat-nachfolger')
|
324
324
|
)
|
325
325
|
|
326
326
|
assert_equal(
|
327
|
-
wd('cd-rom-technologie|
|
327
|
+
wd('cd-rom-technologie|COM', 'cd-rom-technologie|k', 'cd-rom|s+|f', 'cd-rom|s+|m', 'technologie|s+|f'),
|
328
328
|
gra.find_compound('cd-rom-technologie')
|
329
329
|
)
|
330
330
|
|
331
331
|
assert_equal(
|
332
|
-
wd('albert-ludwigs-universität|
|
332
|
+
wd('albert-ludwigs-universität|COM', 'albert-ludwigs-universität|k', 'albert|e+', 'ludwig|e+', 'universität|s+'),
|
333
333
|
gra.find_compound('albert-ludwigs-universität')
|
334
334
|
)
|
335
335
|
|
336
336
|
assert_equal(
|
337
|
-
wd('benutzerforschung|
|
337
|
+
wd('benutzerforschung|COM', 'benutzerforschung|k', 'benutzer|s+', 'forschung|s+'),
|
338
338
|
gra.find_compound('benutzerforschung')
|
339
339
|
)
|
340
340
|
}
|
@@ -372,7 +372,7 @@ class TestGrammar < LingoTestCase
|
|
372
372
|
|
373
373
|
def test_max_parts
|
374
374
|
lg { |gra|
|
375
|
-
assert_equal(wd('baumsbaumsbaum|
|
375
|
+
assert_equal(wd('baumsbaumsbaum|COM', 'baumsbaumsbaum|k', 'baum|s+', 'baum|s+', 'baum|s+'), gra.find_compound('baumsbaumsbaum'))
|
376
376
|
assert_equal(wd('baumsbaumsbaumsbaumsbaumsbaum|?'), gra.find_compound('baumsbaumsbaumsbaumsbaumsbaum'))
|
377
377
|
}
|
378
378
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lingo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Vorhauer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cyclops
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '1.
|
34
|
+
version: '1.3'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '1.
|
41
|
+
version: '1.3'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rubyzip
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,7 +118,7 @@ dependencies:
|
|
118
118
|
version: '0.8'
|
119
119
|
- - ">="
|
120
120
|
- !ruby/object:Gem::Version
|
121
|
-
version: 0.8.
|
121
|
+
version: 0.8.2
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -128,7 +128,7 @@ dependencies:
|
|
128
128
|
version: '0.8'
|
129
129
|
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.8.
|
131
|
+
version: 0.8.2
|
132
132
|
- !ruby/object:Gem::Dependency
|
133
133
|
name: rake
|
134
134
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- dict/de/test_dic.txt
|
200
200
|
- dict/de/test_gen.txt
|
201
201
|
- dict/de/test_mu2.txt
|
202
|
+
- dict/de/test_muh.txt
|
202
203
|
- dict/de/test_mul.txt
|
203
204
|
- dict/de/test_sgw.txt
|
204
205
|
- dict/de/test_syn.txt
|
@@ -220,12 +221,14 @@ files:
|
|
220
221
|
- lib/lingo/app.rb
|
221
222
|
- lib/lingo/attendee.rb
|
222
223
|
- lib/lingo/attendee/abbreviator.rb
|
224
|
+
- lib/lingo/attendee/analysis_filter.rb
|
225
|
+
- lib/lingo/attendee/debug_filter.rb
|
223
226
|
- lib/lingo/attendee/debugger.rb
|
224
227
|
- lib/lingo/attendee/decomposer.rb
|
225
|
-
- lib/lingo/attendee/dehyphenizer.rb
|
226
228
|
- lib/lingo/attendee/formatter.rb
|
229
|
+
- lib/lingo/attendee/hal_filter.rb
|
230
|
+
- lib/lingo/attendee/lsi_filter.rb
|
227
231
|
- lib/lingo/attendee/multi_worder.rb
|
228
|
-
- lib/lingo/attendee/noneword_filter.rb
|
229
232
|
- lib/lingo/attendee/object_filter.rb
|
230
233
|
- lib/lingo/attendee/sequencer.rb
|
231
234
|
- lib/lingo/attendee/stemmer.rb
|
@@ -242,6 +245,9 @@ files:
|
|
242
245
|
- lib/lingo/cli.rb
|
243
246
|
- lib/lingo/config.rb
|
244
247
|
- lib/lingo/ctl.rb
|
248
|
+
- lib/lingo/ctl/analysis.rb
|
249
|
+
- lib/lingo/ctl/files.rb
|
250
|
+
- lib/lingo/ctl/other.rb
|
245
251
|
- lib/lingo/database.rb
|
246
252
|
- lib/lingo/database/crypter.rb
|
247
253
|
- lib/lingo/database/gdbm_store.rb
|
@@ -272,6 +278,7 @@ files:
|
|
272
278
|
- lib/lingo/srv/config.ru
|
273
279
|
- lib/lingo/srv/lingosrv.cfg
|
274
280
|
- lib/lingo/srv/public/.gitkeep
|
281
|
+
- lib/lingo/text_utils.rb
|
275
282
|
- lib/lingo/version.rb
|
276
283
|
- lib/lingo/web.rb
|
277
284
|
- lib/lingo/web/config.ru
|
@@ -282,7 +289,6 @@ files:
|
|
282
289
|
- test/attendee/ts_abbreviator.rb
|
283
290
|
- test/attendee/ts_decomposer.rb
|
284
291
|
- test/attendee/ts_multi_worder.rb
|
285
|
-
- test/attendee/ts_noneword_filter.rb
|
286
292
|
- test/attendee/ts_object_filter.rb
|
287
293
|
- test/attendee/ts_sequencer.rb
|
288
294
|
- test/attendee/ts_stemmer.rb
|
@@ -296,6 +302,7 @@ files:
|
|
296
302
|
- test/lir.txt
|
297
303
|
- test/lir.vec
|
298
304
|
- test/lir2.txt
|
305
|
+
- test/lir3.txt
|
299
306
|
- test/mul.txt
|
300
307
|
- test/ref/artikel.mul
|
301
308
|
- test/ref/artikel.non
|
@@ -328,34 +335,46 @@ licenses:
|
|
328
335
|
metadata: {}
|
329
336
|
post_install_message: |2+
|
330
337
|
|
331
|
-
lingo-1.8.
|
338
|
+
lingo-1.8.7 [2015-08-07]:
|
332
339
|
|
333
|
-
* Lingo::Attendee::
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
* Lingo::Attendee::
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
*
|
346
|
-
|
347
|
-
|
348
|
-
* Lingo::Attendee::Tokenizer
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
340
|
+
* Added Lingo::Attendee::LsiFilter to correlate semantically related terms
|
341
|
+
(LSI[https://en.wikipedia.org/wiki/Latent_semantic_indexing]) over the
|
342
|
+
"corpus" of all files processed during a single program invocation; requires
|
343
|
+
lsi4r[https://blackwinter.github.com/lsi4r] which in turn requires
|
344
|
+
rb-gsl[https://blackwinter.github.com/rb-gsl]. [EXPERIMENTAL: Interface may
|
345
|
+
be changed or removed in next release.]
|
346
|
+
* Added Lingo::Attendee::HalFilter to correlate semantically related terms
|
347
|
+
(HAL[https://en.wikipedia.org/wiki/Hyperspace_Analogue_to_Language]) over
|
348
|
+
individual documents; requires hal4r[https://blackwinter.github.com/hal4r]
|
349
|
+
which in turn requires rb-gsl[https://blackwinter.github.com/rb-gsl].
|
350
|
+
[EXPERIMENTAL: Interface may be changed or removed in next release.]
|
351
|
+
* Added Lingo::Attendee::AnalysisFilter and associated +lingoctl+ tooling.
|
352
|
+
* Multiword dictionaries can now identify hyphenated variants (e.g.
|
353
|
+
<tt>automatic data-processing</tt>); set <tt>hyphenate: true</tt> in the
|
354
|
+
dictionary config.
|
355
|
+
* Lingo::Attendee::Tokenizer no longer considers hyphens at word edges as part
|
356
|
+
of the word. As a consequence, Lingo::Attendee::Dehyphenizer has been
|
357
|
+
dropped.
|
358
|
+
* Dropped Lingo::Attendee::NonewordFilter; use Lingo::Attendee::VectorFilter
|
359
|
+
with option <tt>lexicals: '\?'</tt> instead.
|
360
|
+
* Lingo::Attendee::TextReader and Lingo::Attendee::TextWriter learned
|
361
|
+
+encoding+ option to read/write text that is not UTF-8 encoded;
|
362
|
+
configuration files and dictionaries still need to be UTF-8, though.
|
363
|
+
* Lingo::Attendee::TextReader and Lingo::Attendee::TextWriter learned to
|
364
|
+
read/write Gzip-compressed files (file extension +.gz+ or +.gzip+).
|
365
|
+
* Lingo::Attendee::Sequencer learned to recognize +0+ in the pattern to match
|
366
|
+
number tokens.
|
367
|
+
* Fixed Lingo::Attendee::TextReader to recognize BOM in input files; does not
|
368
|
+
apply to input read from +STDIN+.
|
369
|
+
* Fixed regression introduced in 1.8.6 where Lingo::Attendee::Debugger would
|
370
|
+
no longer work immediately behind Lingo::Attendee::TextReader.
|
371
|
+
* Fixed +lingoctl+ copy commands when overwriting existing files.
|
372
|
+
* Refactored Lingo::Database::Crypter into a module.
|
373
|
+
* JRuby 9000 compatibility.
|
355
374
|
|
356
375
|
rdoc_options:
|
357
376
|
- "--title"
|
358
|
-
- lingo Application documentation (v1.8.
|
377
|
+
- lingo Application documentation (v1.8.7)
|
359
378
|
- "--charset"
|
360
379
|
- UTF-8
|
361
380
|
- "--line-numbers"
|
@@ -376,7 +395,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
376
395
|
version: '0'
|
377
396
|
requirements: []
|
378
397
|
rubyforge_project:
|
379
|
-
rubygems_version: 2.4.
|
398
|
+
rubygems_version: 2.4.8
|
380
399
|
signing_key:
|
381
400
|
specification_version: 4
|
382
401
|
summary: The full-featured automatic indexing system
|