lingo 1.8.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +23 -5
- data/README +1 -1
- data/Rakefile +5 -7
- data/TODO +2 -0
- data/bin/lingo +5 -1
- data/de.lang +1 -1
- data/en/lingo-syn.txt +0 -0
- data/en.lang +2 -1
- data/lib/lingo/attendee/abbreviator.rb +8 -9
- data/lib/lingo/attendee/debugger.rb +5 -4
- data/lib/lingo/attendee/decomposer.rb +8 -3
- data/lib/lingo/attendee/dehyphenizer.rb +19 -63
- data/lib/lingo/attendee/formatter.rb +1 -1
- data/lib/lingo/attendee/multi_worder.rb +67 -155
- data/lib/lingo/attendee/noneword_filter.rb +16 -9
- data/lib/lingo/attendee/object_filter.rb +1 -1
- data/lib/lingo/attendee/sequencer.rb +32 -63
- data/lib/lingo/attendee/stemmer/porter.rb +343 -0
- data/{info/gpl-hdr.txt → lib/lingo/attendee/stemmer.rb} +33 -0
- data/lib/lingo/attendee/synonymer.rb +10 -9
- data/lib/lingo/attendee/text_reader.rb +102 -76
- data/lib/lingo/attendee/text_writer.rb +23 -26
- data/lib/lingo/attendee/tokenizer.rb +13 -27
- data/lib/lingo/attendee/variator.rb +26 -66
- data/lib/lingo/attendee/vector_filter.rb +42 -43
- data/lib/lingo/attendee/word_searcher.rb +6 -7
- data/lib/lingo/attendee.rb +25 -7
- data/lib/lingo/buffered_attendee.rb +36 -10
- data/lib/lingo/cachable.rb +8 -8
- data/lib/lingo/config.rb +5 -6
- data/lib/lingo/ctl.rb +2 -3
- data/lib/lingo/database/crypter.rb +9 -26
- data/lib/lingo/database/gdbm_store.rb +3 -5
- data/lib/lingo/database/libcdb_store.rb +4 -6
- data/lib/lingo/database/sdbm_store.rb +11 -6
- data/lib/lingo/database/show_progress.rb +3 -43
- data/lib/lingo/database/source/key_value.rb +2 -6
- data/lib/lingo/database/source/multi_key.rb +3 -5
- data/lib/lingo/database/source/multi_value.rb +2 -6
- data/lib/lingo/database/source/single_word.rb +4 -6
- data/lib/lingo/database/source/word_class.rb +4 -10
- data/lib/lingo/database/source.rb +20 -18
- data/lib/lingo/database.rb +84 -59
- data/lib/lingo/error.rb +57 -1
- data/lib/lingo/language/dictionary.rb +21 -18
- data/lib/lingo/language/grammar.rb +40 -49
- data/lib/lingo/language/lexical.rb +6 -6
- data/lib/lingo/language/lexical_hash.rb +6 -0
- data/lib/lingo/language/word.rb +32 -15
- data/lib/lingo/language/word_form.rb +1 -1
- data/lib/lingo/language.rb +14 -25
- data/lib/lingo/reportable.rb +12 -10
- data/lib/lingo/show_progress.rb +81 -0
- data/lib/lingo/version.rb +1 -1
- data/lib/lingo.rb +63 -24
- data/lingo-call.cfg +6 -10
- data/lingo.cfg +60 -44
- data/lir.cfg +42 -41
- data/test/attendee/ts_abbreviator.rb +3 -5
- data/test/attendee/ts_decomposer.rb +3 -5
- data/test/attendee/ts_multi_worder.rb +87 -145
- data/test/attendee/ts_noneword_filter.rb +5 -3
- data/test/attendee/ts_object_filter.rb +5 -3
- data/test/attendee/ts_sequencer.rb +3 -5
- data/test/attendee/ts_stemmer.rb +309 -0
- data/test/attendee/ts_synonymer.rb +15 -11
- data/test/attendee/ts_text_reader.rb +12 -15
- data/test/attendee/ts_text_writer.rb +24 -29
- data/test/attendee/ts_tokenizer.rb +9 -7
- data/test/attendee/ts_variator.rb +4 -4
- data/test/attendee/ts_vector_filter.rb +24 -16
- data/test/attendee/ts_word_searcher.rb +20 -36
- data/test/{lir.csv → lir.vec} +0 -0
- data/test/ref/artikel.vec +943 -943
- data/test/ref/artikel.ven +943 -943
- data/test/ref/lir.non +201 -201
- data/test/ref/lir.seq +178 -178
- data/test/ref/lir.syn +49 -49
- data/test/ref/lir.vec +329 -0
- data/test/test_helper.rb +20 -36
- data/test/ts_database.rb +10 -10
- data/test/ts_language.rb +279 -319
- metadata +93 -104
- data/info/Objekte.png +0 -0
- data/info/Typen.png +0 -0
- data/info/database.png +0 -0
- data/info/db_small.png +0 -0
- data/info/download.png +0 -0
- data/info/kerze.png +0 -0
- data/info/language.png +0 -0
- data/info/lingo.png +0 -0
- data/info/logo.png +0 -0
- data/info/meeting.png +0 -0
- data/info/types.png +0 -0
- data/lingo-all.cfg +0 -89
- data/porter/stem.cfg +0 -311
- data/porter/stem.rb +0 -150
- data/test/ref/lir.csv +0 -329
- data/test.cfg +0 -79
data/test/ts_database.rb
CHANGED
@@ -3,10 +3,13 @@
|
|
3
3
|
require_relative 'test_helper'
|
4
4
|
|
5
5
|
class Lingo::Database
|
6
|
+
|
6
7
|
alias_method :original_convert, :convert
|
8
|
+
|
7
9
|
def convert(verbose = false)
|
8
10
|
original_convert(verbose)
|
9
11
|
end
|
12
|
+
|
10
13
|
end
|
11
14
|
|
12
15
|
class TestDatabase < LingoTestCase
|
@@ -176,11 +179,11 @@ Wort2=
|
|
176
179
|
'separator' => '*',
|
177
180
|
'def-wc' => 's'
|
178
181
|
}, @keyvalue, {
|
179
|
-
'wort1'=>'projektion1#s|projektion4#s|projektion5#s',
|
180
|
-
'wort2'=>'projektion2#s',
|
181
|
-
'wort3'=>'projektion3#s',
|
182
|
-
'mehr wort satz'=>'pro jeck zion 1#s|pro jeck zion 2#s',
|
183
|
-
'albert einstein'=>'einstein, albert#s'
|
182
|
+
'wort1' => 'projektion1#s|projektion4#s|projektion5#s',
|
183
|
+
'wort2' => 'projektion2#s',
|
184
|
+
'wort3' => 'projektion3#s',
|
185
|
+
'mehr wort satz' => 'pro jeck zion 1#s|pro jeck zion 2#s',
|
186
|
+
'albert einstein' => 'einstein, albert#s'
|
184
187
|
})
|
185
188
|
end
|
186
189
|
|
@@ -253,10 +256,7 @@ Wort2=
|
|
253
256
|
if block_given?
|
254
257
|
yield db
|
255
258
|
else
|
256
|
-
|
257
|
-
store.delete(Lingo::Database::SYS_KEY)
|
258
|
-
|
259
|
-
assert_equal(output, store)
|
259
|
+
assert_equal(output, db.to_h.tap { |store| store.delete(Lingo::Database::SYS_KEY) })
|
260
260
|
end
|
261
261
|
}
|
262
262
|
ensure
|
@@ -264,7 +264,7 @@ Wort2=
|
|
264
264
|
end
|
265
265
|
|
266
266
|
def set_config(id, config)
|
267
|
-
"_test_#{id}_".tap { |
|
267
|
+
"_test_#{id}_".tap { |i| @lingo.config["language/dictionary/databases/#{i}"] = config }
|
268
268
|
end
|
269
269
|
|
270
270
|
end
|