kyanite 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/0 start all Tests.bat +23 -0
- data/History.txt +4 -0
- data/License.txt +21 -0
- data/Manifest.txt +88 -0
- data/PostInstall.txt +4 -0
- data/README.txt +48 -0
- data/Rakefile.rb +79 -0
- data/init.rb +2 -0
- data/lib/kyanite.rb +39 -0
- data/lib/kyanite/array.rb +5 -0
- data/lib/kyanite/array/array.rb +172 -0
- data/lib/kyanite/array/array2.rb +140 -0
- data/lib/kyanite/array/matrix2.rb +120 -0
- data/lib/kyanite/array_of_enumerables.rb +2 -0
- data/lib/kyanite/array_of_numerics.rb +2 -0
- data/lib/kyanite/array_of_strings.rb +2 -0
- data/lib/kyanite/basics.rb +60 -0
- data/lib/kyanite/dictionary.rb +116 -0
- data/lib/kyanite/enumerable.rb +7 -0
- data/lib/kyanite/enumerable/enumerable_enumerables.rb +70 -0
- data/lib/kyanite/enumerable/enumerable_numerics.rb +171 -0
- data/lib/kyanite/enumerable/enumerable_strings.rb +58 -0
- data/lib/kyanite/enumerable/structure.rb +170 -0
- data/lib/kyanite/general.rb +8 -0
- data/lib/kyanite/general/callerutils.rb +128 -0
- data/lib/kyanite/general/classutils.rb +246 -0
- data/lib/kyanite/general/kernel.rb +105 -0
- data/lib/kyanite/general/nil.rb +64 -0
- data/lib/kyanite/general/object.rb +86 -0
- data/lib/kyanite/general/true_false.rb +65 -0
- data/lib/kyanite/general/undoable.rb +24 -0
- data/lib/kyanite/hash.rb +170 -0
- data/lib/kyanite/matrix2.rb +2 -0
- data/lib/kyanite/nil.rb +3 -0
- data/lib/kyanite/numeric.rb +4 -0
- data/lib/kyanite/numeric/float.rb +26 -0
- data/lib/kyanite/numeric/integer.rb +34 -0
- data/lib/kyanite/numeric/numeric.rb +45 -0
- data/lib/kyanite/operation.rb +5 -0
- data/lib/kyanite/operation/call_tracker.rb +69 -0
- data/lib/kyanite/operation/rake.rb +101 -0
- data/lib/kyanite/operation/regexp.rb +23 -0
- data/lib/kyanite/operation/unit_test.rb +53 -0
- data/lib/kyanite/optimizer.rb +119 -0
- data/lib/kyanite/rake.rb +2 -0
- data/lib/kyanite/range.rb +54 -0
- data/lib/kyanite/set.rb +219 -0
- data/lib/kyanite/smart_load_path.rb +2 -0
- data/lib/kyanite/string.rb +13 -0
- data/lib/kyanite/string/cast.rb +104 -0
- data/lib/kyanite/string/chars.rb +184 -0
- data/lib/kyanite/string/chars_const.rb +190 -0
- data/lib/kyanite/string/diff.rb +78 -0
- data/lib/kyanite/string/div.rb +19 -0
- data/lib/kyanite/string/include.rb +43 -0
- data/lib/kyanite/string/list.rb +84 -0
- data/lib/kyanite/string/mgsub.rb +35 -0
- data/lib/kyanite/string/nested.rb +253 -0
- data/lib/kyanite/string/random.rb +69 -0
- data/lib/kyanite/string/split.rb +136 -0
- data/lib/kyanite/symbol.rb +19 -0
- data/lib/kyanite/tree.rb +99 -0
- data/lib/kyanite/undoable.rb +2 -0
- data/lib/kyanite/unit_test.rb +2 -0
- data/test/_start_all.rb +17 -0
- data/test/array/test_array.rb +106 -0
- data/test/array/test_matrix2.rb +162 -0
- data/test/enumerable/test_enumerable_enumerables.rb +46 -0
- data/test/enumerable/test_enumerable_numerics.rb +93 -0
- data/test/enumerable/test_enumerable_strings.rb +22 -0
- data/test/enumerable/test_structure.rb +220 -0
- data/test/general/test_classutils.rb +45 -0
- data/test/general/test_nil.rb +44 -0
- data/test/general/test_object.rb +49 -0
- data/test/general/test_true_false.rb +28 -0
- data/test/numeric/test_numeric_integer.rb +28 -0
- data/test/string/test_cast.rb +108 -0
- data/test/string/test_chars.rb +255 -0
- data/test/string/test_diff.rb +95 -0
- data/test/string/test_list.rb +141 -0
- data/test/string/test_nested.rb +361 -0
- data/test/string/test_split.rb +187 -0
- data/test/test_dictionary.rb +128 -0
- data/test/test_hash.rb +59 -0
- data/test/test_optimizer.rb +150 -0
- data/test/test_range.rb +41 -0
- data/test/test_set.rb +210 -0
- data/test/test_tree.rb +94 -0
- metadata +217 -0
data/test/test_range.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
|
2
|
+
require 'kyanite/unit_test'
|
3
|
+
require 'kyanite/smart_load_path'; smart_load_path
|
4
|
+
require 'perception' if $0 == __FILE__
|
5
|
+
|
6
|
+
require 'kyanite/range'
|
7
|
+
|
8
|
+
|
9
|
+
class TestKyaniteRange < UnitTest
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
def test_invert
|
14
|
+
|
15
|
+
# leeres Teil ausgeben
|
16
|
+
assert_equal (1..0), (0..-1).invert_index
|
17
|
+
|
18
|
+
# vorderen Teil ausgeben
|
19
|
+
assert_equal (0..1), (2..-1).invert_index
|
20
|
+
assert_equal (0..2), (3..-1).invert_index
|
21
|
+
assert_equal (0..-3), (-2..-1).invert_index
|
22
|
+
|
23
|
+
# hinteren Teil ausgeben
|
24
|
+
assert_equal (2..-1), (0..1).invert_index
|
25
|
+
assert_equal (6..-1), (0..5).invert_index
|
26
|
+
assert_equal (-1..-1), (0..-2).invert_index
|
27
|
+
assert_equal (-2..-1), (0..-3).invert_index
|
28
|
+
|
29
|
+
# au�en
|
30
|
+
assert_equal [0..1, 5..-1], (2..4).invert_index
|
31
|
+
assert_equal [0..-6, -2..-1], (-5..-3).invert_index
|
32
|
+
assert_equal [0..1, -2..-1], (2..-3).invert_index
|
33
|
+
assert_equal [0..-6, 5..-1], (-5..4).invert_index
|
34
|
+
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
end # class
|
data/test/test_set.rb
ADDED
@@ -0,0 +1,210 @@
|
|
1
|
+
|
2
|
+
require 'kyanite/unit_test'
|
3
|
+
require 'kyanite/smart_load_path'; smart_load_path
|
4
|
+
require 'perception' if $0 == __FILE__
|
5
|
+
|
6
|
+
require 'kyanite/set'
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
# Tests für Set, OrderedSet, SortedSet
|
11
|
+
#
|
12
|
+
class TestKyaniteSet < UnitTest
|
13
|
+
|
14
|
+
|
15
|
+
# ungeordnet
|
16
|
+
def test_set
|
17
|
+
array = [1,2,7,1,1,5,2,5,1]
|
18
|
+
assert_equal [1,2,7,5], array.uniq # uniq
|
19
|
+
assert_equal array.to_set, [1,2,7,5].to_set # to-set macht auch ein uniq
|
20
|
+
assert_equal [5,7,2,1].to_set, [1,2,7,5].to_set # Sets sind ungeordnet
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# behält die Reihenfolge
|
25
|
+
def test_ordered_set
|
26
|
+
# assert ([5,2,7,1].to_ordered_set != [1,2,7,5].to_ordered_set)
|
27
|
+
assert_equal [1,2,7,5], [1,2,7,1,1,5,2,5,1].to_ordered_set.to_a
|
28
|
+
assert_equal [5,2,7,1], [5,2,7,1,1,5,2,5,1].to_ordered_set.to_a
|
29
|
+
|
30
|
+
test = [5,:a,7,1,1,5,:a,5,1].to_ordered_set
|
31
|
+
assert_equal 5, test[0]
|
32
|
+
assert_equal :a, test[1]
|
33
|
+
assert_equal 1, test[-1]
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
# sortiert
|
38
|
+
def test_sorted_set
|
39
|
+
assert_equal [1,2,5,7], [1,2,7,1,1,5,2,5,1].to_sorted_set.to_a
|
40
|
+
assert_equal [1,2,5,7], [5,2,7,1,1,5,2,5,1].to_sorted_set.to_a
|
41
|
+
end
|
42
|
+
|
43
|
+
|
44
|
+
def test_equal
|
45
|
+
assert_equal ['Set'].to_set, ['Set'].to_set
|
46
|
+
assert_equal [:a, :b].to_set, [:a, :b].to_set
|
47
|
+
assert_equal [:b, :a].to_set, [:a, :b].to_set
|
48
|
+
|
49
|
+
# Erfordert die Korrektur der Methoden hash und eql? in der Klasse Hash
|
50
|
+
assert_equal [[:a].to_set, [:b].to_set].to_set, [[:a].to_set, [:b].to_set].to_set
|
51
|
+
assert_equal [[:b].to_set, [:a].to_set].to_set, [[:a].to_set, [:b].to_set].to_set
|
52
|
+
|
53
|
+
assert_equal ['OrderedSet'].to_ordered_set, ['OrderedSet'].to_ordered_set
|
54
|
+
assert_equal [:a, :b].to_ordered_set, [:a, :b].to_ordered_set
|
55
|
+
assert_equal [:b, :a].to_ordered_set, [:a, :b].to_ordered_set
|
56
|
+
|
57
|
+
assert_equal ['SortedSet'].to_sorted_set, ['SortedSet'].to_sorted_set
|
58
|
+
assert_equal [:a, :b].to_sorted_set, [:a, :b].to_sorted_set
|
59
|
+
assert_equal [:b, :a].to_sorted_set, [:a, :b].to_sorted_set
|
60
|
+
end
|
61
|
+
|
62
|
+
|
63
|
+
def test_hash
|
64
|
+
s = Set.new
|
65
|
+
s << {:user_id => 1, :private => false}
|
66
|
+
assert_equal 1, s.size
|
67
|
+
s << {:user_id => 1, :private => false}
|
68
|
+
assert_equal 1, s.size
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
def test_index
|
74
|
+
test = [:d, :c, :b, :a].to_ordered_set
|
75
|
+
assert_equal 0, test.index(:d)
|
76
|
+
assert_equal 3, test.index(:a)
|
77
|
+
end
|
78
|
+
|
79
|
+
|
80
|
+
def test_is_collection
|
81
|
+
assert [1].to_set.is_collection?
|
82
|
+
assert [1].to_sorted_set.is_collection?
|
83
|
+
assert [1].to_ordered_set.is_collection?
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
def test_each
|
88
|
+
test = [:d, :c, :b, :a].to_set
|
89
|
+
result = []
|
90
|
+
test.each do |e|
|
91
|
+
result << e
|
92
|
+
end
|
93
|
+
assert_equal [:a, :b, :c, :d], result.sort
|
94
|
+
|
95
|
+
test = [:d, :c, :b, :a].to_sorted_set
|
96
|
+
result = []
|
97
|
+
test.each do |e|
|
98
|
+
result << e
|
99
|
+
end
|
100
|
+
assert_equal [:a, :b, :c, :d], result
|
101
|
+
|
102
|
+
test = [:d, :c, :b, :a].to_ordered_set
|
103
|
+
result = []
|
104
|
+
test.each do |e|
|
105
|
+
result << e
|
106
|
+
end
|
107
|
+
assert_equal [:d, :c, :b, :a], result
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
# def test_to_set_of_sets
|
113
|
+
# expected = Set.new([
|
114
|
+
# Set.new([:eins]),
|
115
|
+
# Set.new([:zwei]),
|
116
|
+
# Set.new([:drei]),
|
117
|
+
# ])
|
118
|
+
# assert_equal expected, [:eins, :zwei, :drei].to_set_of_sets
|
119
|
+
# assert_equal expected, [:zwei, :eins, :drei].to_set_of_sets
|
120
|
+
# assert_equal SetOfSets, [:zwei, :eins, :drei].to_set_of_sets.class
|
121
|
+
|
122
|
+
# assert_equal expected, [[:zwei], [:eins], [:drei]].to_set_of_sets
|
123
|
+
|
124
|
+
# expected = [[:c], [:eins, :zwei], [:a, :b], [:drei]].to_set_of_sets
|
125
|
+
# assert_equal expected, [[:eins, :zwei], :drei].to_set_of_sets + [[:a, :b], :c].to_set_of_sets
|
126
|
+
# end
|
127
|
+
|
128
|
+
|
129
|
+
def test_equal_2
|
130
|
+
print 'x'
|
131
|
+
#return
|
132
|
+
|
133
|
+
a = [ 'Liam', 'Lolomai', 'Ljubow', 'Luise', 'Livian', 'Levin', 'Lian', 'Leana', 'Lorita', 'Lady', 'Leslie', 'Lena', 'Lensi', 'Livio', 'Lorraine',
|
134
|
+
'Liana', 'Linus', 'Lennet', 'Lorna', 'Levi', 'Leonie', 'Linna', 'Lucill', 'Luk', 'Léan', 'Laurence', 'Laurin', 'Lucia', 'Lúthien',
|
135
|
+
'László', 'Leonharda', 'Liane', 'Lene', 'Lambert', 'Lukas', 'Lothar', 'Lykka', 'Lissy', 'Lilian', 'Lina', 'Liv', 'Laura', 'Levent',
|
136
|
+
'Lotta', 'Lysander', 'Lientje', 'Lynn', 'Lea', 'Lucie', 'Laurens', 'Lance', 'Lionel', 'Leonore', 'Leni', 'Larry', 'Lale', 'Laurent',
|
137
|
+
'Leontine', 'Lara', 'Larissa', 'Lamprecht', 'Leandro', 'Leyla', 'Ljilja', 'Line', 'Liz', 'Lloyd', 'Lotte', 'Ludwig', 'Lodewijk', 'Leonhard',
|
138
|
+
'Laurentius', 'Lenn', 'Leticia', 'Lioba', 'Leif', 'Louis', 'Lieselotte', 'Lenelies', 'Lennart', 'Levke', 'Lizzy', 'Luis', 'Lorenz', 'Lei',
|
139
|
+
'Laurenz', 'Levente', 'Lucius', 'Louisa', 'Lorcan', 'Lucy', 'Lutz', 'Liria', 'Ludmilla', 'Lilli', 'Lewin', 'Luciano', 'Linn', 'Laetitia',
|
140
|
+
'Liselotte', 'Lasse', 'Louise', 'Laje', 'Len', 'Linda', 'Lieven', 'Luitgard', 'Lais', 'Lisanne', 'Lunis', 'Leo', 'Laijana', 'Lyn', 'Leolas',
|
141
|
+
'Leona', 'Laatvik', 'Latif', 'Luka', 'Lutricia', 'Lia', 'Leonard', 'Larina', 'Livia', 'Leiderat', 'Lukaja', 'Ljudmila', 'Leila', 'Lienhard',
|
142
|
+
'Lenja', 'Ljubiša', 'Lilith', 'Lennox', 'Luna', 'Lenio', 'Leah', 'Lydia', 'Ljiljana', 'Lili', 'Lauritz', 'Liska', 'Lola', 'Lenny', 'Lenore',
|
143
|
+
'Lorena', 'Leilani', 'Leon', 'Lacey', 'Luke', 'Lars', 'Lev', 'Ludger', 'Laila', 'Loris', 'Lakambini', 'Lidwina', 'Laurentia', 'Larees',
|
144
|
+
'Luana', 'Leoni', 'Loreley', 'Lucas', 'Luca', 'Langer', 'Liah', 'Leander', 'Letizia', 'Luc', 'Lana', 'Laurie', 'Linnea', 'Lajos',
|
145
|
+
'Lidia', 'Luisa', 'Lilo', 'Lenya', 'Lion', 'Luigi', 'Leandra', 'Linya', 'Lenius', 'Lisa', 'Leonardo', 'Lore', 'Laureen', 'Lilly', 'Lennard']
|
146
|
+
|
147
|
+
b = [ 'Liam', 'Lolomai', 'Livian', 'Levin', 'Lian', 'Luise', 'Ljubow', 'Leana', 'Lorita', 'Lena', 'Lensi', 'Livio', 'Lorraine', 'Liana', 'Linus',
|
148
|
+
'Lady', 'Leslie', 'Lennet', 'Lorna', 'Levi', 'Leonie', 'Linna', 'Léan', 'Lucill', 'Laurence', 'Luk', 'Laurin', 'Leonharda', 'Liane',
|
149
|
+
'László', 'Lucia', 'Lúthien', 'Lene', 'Lukas', 'Lambert', 'Lissy', 'Lykka', 'Lothar', 'Lilian', 'Liv', 'Lina', 'Laura', 'Lientje', 'Lotta',
|
150
|
+
'Lynn', 'Levent', 'Lea', 'Lysander', 'Laurens', 'Lance', 'Lucie', 'Lionel', 'Leonore', 'Leni', 'Larry', 'Lale', 'Laurent', 'Leontine', 'Lara',
|
151
|
+
'Larissa', 'Leandro', 'Leyla', 'Lamprecht', 'Ljilja', 'Liz', 'Line', 'Ludwig', 'Lloyd', 'Lotte', 'Leonhard', 'Laurentius', 'Lenn', 'Lodewijk',
|
152
|
+
'Leif', 'Lieselotte', 'Louis', 'Lenelies', 'Lioba', 'Leticia', 'Lennart', 'Lizzy', 'Lorenz', 'Lei', 'Luis', 'Levke', 'Laurenz', 'Lorcan',
|
153
|
+
'Lucius', 'Levente', 'Louisa', 'Lutz', 'Liria', 'Lucy', 'Lilli', 'Ludmilla', 'Lewin', 'Linn', 'Luciano', 'Laje', 'Laetitia', 'Len',
|
154
|
+
'Louise', 'Lasse', 'Liselotte', 'Linda', 'Leona', 'Lieven', 'Lunis', 'Lisanne', 'Leo', 'Laijana', 'Luitgard', 'Lais', 'Lyn', 'Leolas',
|
155
|
+
'Larina', 'Leonard', 'Lia', 'Lutricia', 'Luka', 'Latif', 'Laatvik', 'Lenja', 'Lienhard', 'Leila', 'Ljudmila', 'Lukaja', 'Leiderat',
|
156
|
+
'Livia', 'Leah', 'Lenio', 'Luna', 'Lennox', 'Lilith', 'Ljubiša', 'Lauritz', 'Lili', 'Ljiljana', 'Lydia', 'Leon', 'Leilani', 'Lorena',
|
157
|
+
'Lenore', 'Lenny', 'Lola', 'Liska', 'Lars', 'Luke', 'Lacey', 'Loris', 'Laila', 'Ludger', 'Lev', 'Loreley', 'Leoni', 'Luana', 'Larees',
|
158
|
+
'Laurentia', 'Lidwina', 'Lakambini', 'Leander', 'Liah', 'Langer', 'Luca', 'Lucas', 'Lajos', 'Linnea', 'Laurie', 'Lana', 'Luc',
|
159
|
+
'Letizia', 'Lion', 'Lenya', 'Lilo', 'Luisa', 'Lidia', 'Lenius', 'Linya', 'Leandra', 'Luigi', 'Lennard', 'Lilly', 'Laureen',
|
160
|
+
'Lore', 'Leonardo', 'Lisa']
|
161
|
+
|
162
|
+
assert_equal a.sort, b.sort
|
163
|
+
assert_equal a.sort.hash, b.sort.hash
|
164
|
+
assert_not_equal a.to_set.hash, b.to_set.hash
|
165
|
+
assert_equal a.to_set, b.to_set
|
166
|
+
|
167
|
+
|
168
|
+
# Hier funktioniert Set nicht !!!
|
169
|
+
c = Set.new
|
170
|
+
c << a.to_set
|
171
|
+
c << b.to_set
|
172
|
+
# assert_equal 1, c.size
|
173
|
+
assert_equal 2, c.size
|
174
|
+
|
175
|
+
# puts
|
176
|
+
# c.each do |e|
|
177
|
+
# pp e.hash
|
178
|
+
# end
|
179
|
+
# see c
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
end
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
end # class
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
data/test/test_tree.rb
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
|
2
|
+
require 'kyanite/unit_test'
|
3
|
+
require 'kyanite/smart_load_path'; smart_load_path
|
4
|
+
require 'perception' if $0 == __FILE__
|
5
|
+
|
6
|
+
require 'kyanite/tree'
|
7
|
+
require 'kyanite/symbol'
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
class TestKyaniteTree < UnitTest
|
13
|
+
|
14
|
+
def setup
|
15
|
+
|
16
|
+
# * root
|
17
|
+
# |---+ item ---> de ---> name
|
18
|
+
# | |
|
19
|
+
# | +---> abbrev
|
20
|
+
# |
|
21
|
+
# |
|
22
|
+
# |---+ singlechar
|
23
|
+
# | |---- struktur ---> punkt ---> satzende
|
24
|
+
# | |---> minus
|
25
|
+
# | +---> sonderzeichen
|
26
|
+
# |
|
27
|
+
# |---> num
|
28
|
+
# |---- site ---> url
|
29
|
+
# +---> sonstiges
|
30
|
+
|
31
|
+
|
32
|
+
# Oberste Ebene
|
33
|
+
ttroot = Tree::TreeNode.new(:root)
|
34
|
+
ttroot << Tree::TreeNode.new(:ta_item)
|
35
|
+
ttroot << Tree::TreeNode.new(:ta_num)
|
36
|
+
ttroot << Tree::TreeNode.new(:ta_site) << Tree::TreeNode.new(:ta_url)
|
37
|
+
ttroot << Tree::TreeNode.new(:ta_sonstiges)
|
38
|
+
|
39
|
+
# :singlechar
|
40
|
+
ttroot << Tree::TreeNode.new(:singlechar)
|
41
|
+
ttroot[:singlechar] << Tree::TreeNode.new(:ta_struktur) << Tree::TreeNode.new(:ta_punkt) << Tree::TreeNode.new(:wa_satzende)
|
42
|
+
ttroot[:singlechar] << Tree::TreeNode.new(:ta_minus)
|
43
|
+
ttroot[:singlechar] << Tree::TreeNode.new(:ta_sonderzeichen)
|
44
|
+
|
45
|
+
# :item
|
46
|
+
ttroot[:ta_item] << (wa_word=Tree::TreeNode.new(:wa_word)) << Tree::TreeNode.new(:wa_name)
|
47
|
+
wa_word << Tree::TreeNode.new(:wa_abbrev)
|
48
|
+
wa_word << Tree::TreeNode.new(:wa_multi)
|
49
|
+
|
50
|
+
ttroot_hash = {}
|
51
|
+
ttroot_hash[:de] = ttroot
|
52
|
+
|
53
|
+
@tokenizer_tree_root = ttroot_hash
|
54
|
+
|
55
|
+
end
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
def test_allkeys
|
61
|
+
|
62
|
+
assert_equal [ :singlechar,
|
63
|
+
:ta_item,
|
64
|
+
:ta_minus,
|
65
|
+
:ta_num,
|
66
|
+
:ta_punkt,
|
67
|
+
:ta_site,
|
68
|
+
:ta_sonderzeichen,
|
69
|
+
:ta_sonstiges,
|
70
|
+
:ta_struktur,
|
71
|
+
:ta_url,
|
72
|
+
:wa_abbrev,
|
73
|
+
:wa_multi,
|
74
|
+
:wa_name,
|
75
|
+
:wa_satzende,
|
76
|
+
:wa_word ], @tokenizer_tree_root[:de].find(:root).all_child_keys.sort
|
77
|
+
|
78
|
+
assert_equal [:wa_abbrev, :wa_multi, :wa_name, :wa_word],
|
79
|
+
@tokenizer_tree_root[:de].find(:ta_item).all_child_keys.sort
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
def pest_see_tree
|
84
|
+
puts
|
85
|
+
puts
|
86
|
+
@tokenizer_tree_root[:de].printTree
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
end # class
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
metadata
ADDED
@@ -0,0 +1,217 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: kyanite
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bjoern Klippstein
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-12-08 00:00:00 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: activesupport
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.2.2
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: facets
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.5.0
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rubytree
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.5.2
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: newgem
|
47
|
+
type: :development
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.1.0
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: hoe
|
57
|
+
type: :development
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.8.0
|
64
|
+
version:
|
65
|
+
description: FIX (describe your package)
|
66
|
+
email:
|
67
|
+
- bjoernklippstein@gmail.com
|
68
|
+
executables: []
|
69
|
+
|
70
|
+
extensions: []
|
71
|
+
|
72
|
+
extra_rdoc_files:
|
73
|
+
- History.txt
|
74
|
+
- License.txt
|
75
|
+
- Manifest.txt
|
76
|
+
- PostInstall.txt
|
77
|
+
- README.txt
|
78
|
+
files:
|
79
|
+
- lib/kyanite.rb
|
80
|
+
- lib/kyanite/array/array2.rb
|
81
|
+
- lib/kyanite/array/array.rb
|
82
|
+
- lib/kyanite/array/matrix2.rb
|
83
|
+
- lib/kyanite/enumerable/enumerable_enumerables.rb
|
84
|
+
- lib/kyanite/enumerable/enumerable_numerics.rb
|
85
|
+
- lib/kyanite/enumerable/enumerable_strings.rb
|
86
|
+
- lib/kyanite/enumerable/structure.rb
|
87
|
+
- lib/kyanite/general/callerutils.rb
|
88
|
+
- lib/kyanite/general/classutils.rb
|
89
|
+
- lib/kyanite/general/kernel.rb
|
90
|
+
- lib/kyanite/general/nil.rb
|
91
|
+
- lib/kyanite/general/object.rb
|
92
|
+
- lib/kyanite/general/true_false.rb
|
93
|
+
- lib/kyanite/general/undoable.rb
|
94
|
+
- lib/kyanite/numeric/float.rb
|
95
|
+
- lib/kyanite/numeric/integer.rb
|
96
|
+
- lib/kyanite/numeric/numeric.rb
|
97
|
+
- lib/kyanite/operation/call_tracker.rb
|
98
|
+
- lib/kyanite/operation/rake.rb
|
99
|
+
- lib/kyanite/operation/unit_test.rb
|
100
|
+
- lib/kyanite/operation/regexp.rb
|
101
|
+
- lib/kyanite/string/cast.rb
|
102
|
+
- lib/kyanite/string/chars.rb
|
103
|
+
- lib/kyanite/string/chars_const.rb
|
104
|
+
- lib/kyanite/string/diff.rb
|
105
|
+
- lib/kyanite/string/div.rb
|
106
|
+
- lib/kyanite/string/include.rb
|
107
|
+
- lib/kyanite/string/list.rb
|
108
|
+
- lib/kyanite/string/mgsub.rb
|
109
|
+
- lib/kyanite/string/nested.rb
|
110
|
+
- lib/kyanite/string/random.rb
|
111
|
+
- lib/kyanite/string/split.rb
|
112
|
+
- lib/kyanite/array.rb
|
113
|
+
- lib/kyanite/array_of_enumerables.rb
|
114
|
+
- lib/kyanite/array_of_numerics.rb
|
115
|
+
- lib/kyanite/array_of_strings.rb
|
116
|
+
- lib/kyanite/basics.rb
|
117
|
+
- lib/kyanite/dictionary.rb
|
118
|
+
- lib/kyanite/enumerable.rb
|
119
|
+
- lib/kyanite/general.rb
|
120
|
+
- lib/kyanite/hash.rb
|
121
|
+
- lib/kyanite/matrix2.rb
|
122
|
+
- lib/kyanite/nil.rb
|
123
|
+
- lib/kyanite/numeric.rb
|
124
|
+
- lib/kyanite/operation.rb
|
125
|
+
- lib/kyanite/optimizer.rb
|
126
|
+
- lib/kyanite/rake.rb
|
127
|
+
- lib/kyanite/range.rb
|
128
|
+
- lib/kyanite/set.rb
|
129
|
+
- lib/kyanite/smart_load_path.rb
|
130
|
+
- lib/kyanite/string.rb
|
131
|
+
- lib/kyanite/symbol.rb
|
132
|
+
- lib/kyanite/tree.rb
|
133
|
+
- lib/kyanite/undoable.rb
|
134
|
+
- lib/kyanite/unit_test.rb
|
135
|
+
- 0 start all Tests.bat
|
136
|
+
- History.txt
|
137
|
+
- init.rb
|
138
|
+
- License.txt
|
139
|
+
- Manifest.txt
|
140
|
+
- PostInstall.txt
|
141
|
+
- Rakefile.rb
|
142
|
+
- README.txt
|
143
|
+
- test/array/test_array.rb
|
144
|
+
- test/array/test_matrix2.rb
|
145
|
+
- test/enumerable/test_enumerable_enumerables.rb
|
146
|
+
- test/enumerable/test_enumerable_numerics.rb
|
147
|
+
- test/enumerable/test_enumerable_strings.rb
|
148
|
+
- test/enumerable/test_structure.rb
|
149
|
+
- test/general/test_classutils.rb
|
150
|
+
- test/general/test_nil.rb
|
151
|
+
- test/general/test_object.rb
|
152
|
+
- test/general/test_true_false.rb
|
153
|
+
- test/numeric/test_numeric_integer.rb
|
154
|
+
- test/string/test_cast.rb
|
155
|
+
- test/string/test_chars.rb
|
156
|
+
- test/string/test_diff.rb
|
157
|
+
- test/string/test_list.rb
|
158
|
+
- test/string/test_nested.rb
|
159
|
+
- test/string/test_split.rb
|
160
|
+
- test/_start_all.rb
|
161
|
+
- test/test_dictionary.rb
|
162
|
+
- test/test_hash.rb
|
163
|
+
- test/test_optimizer.rb
|
164
|
+
- test/test_range.rb
|
165
|
+
- test/test_set.rb
|
166
|
+
- test/test_tree.rb
|
167
|
+
has_rdoc: true
|
168
|
+
homepage: FIX (url)
|
169
|
+
post_install_message: PostInstall.txt
|
170
|
+
rdoc_options:
|
171
|
+
- --main
|
172
|
+
- README.txt
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: "0"
|
180
|
+
version:
|
181
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - ">="
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: "0"
|
186
|
+
version:
|
187
|
+
requirements: []
|
188
|
+
|
189
|
+
rubyforge_project: kyanite
|
190
|
+
rubygems_version: 1.2.0
|
191
|
+
signing_key:
|
192
|
+
specification_version: 2
|
193
|
+
summary: FIX (describe your package)
|
194
|
+
test_files:
|
195
|
+
- test/array/test_array.rb
|
196
|
+
- test/array/test_matrix2.rb
|
197
|
+
- test/enumerable/test_enumerable_enumerables.rb
|
198
|
+
- test/enumerable/test_enumerable_numerics.rb
|
199
|
+
- test/enumerable/test_enumerable_strings.rb
|
200
|
+
- test/enumerable/test_structure.rb
|
201
|
+
- test/general/test_classutils.rb
|
202
|
+
- test/general/test_nil.rb
|
203
|
+
- test/general/test_object.rb
|
204
|
+
- test/general/test_true_false.rb
|
205
|
+
- test/numeric/test_numeric_integer.rb
|
206
|
+
- test/string/test_cast.rb
|
207
|
+
- test/string/test_chars.rb
|
208
|
+
- test/string/test_diff.rb
|
209
|
+
- test/string/test_list.rb
|
210
|
+
- test/string/test_nested.rb
|
211
|
+
- test/string/test_split.rb
|
212
|
+
- test/test_dictionary.rb
|
213
|
+
- test/test_hash.rb
|
214
|
+
- test/test_optimizer.rb
|
215
|
+
- test/test_range.rb
|
216
|
+
- test/test_set.rb
|
217
|
+
- test/test_tree.rb
|