76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
+
+
+
+
+
|
-- ordered map, that can be used with Dictionary.Hash.
type Search_Trie is private;
procedure Initialize (Trie : out Search_Trie; Dict : in Dictionary);
function Search (Trie : in Search_Trie; Value : in String) return Natural;
-- Trie-based search in a dynamic dictionary, for lookup whose
-- speed-vs-memory is even more skewed towards speed.
procedure Set_Dictionary_For_Trie_Search (Dict : in Dictionary);
function Trie_Search (Value : String) return Natural;
-- Function and data source for trie-based search that can be
-- used with Dictionary.Hash.
type String_Count is range 0 .. 2 ** 31 - 1;
-- Type for a number of substring occurrences
type Word_Counter is private;
-- Accumulate frequency/occurrence counts for a set of strings
|
183
184
185
186
187
188
189
190
191
|
188
189
190
191
192
193
194
195
196
197
198
|
+
+
|
overriding procedure Adjust (Node : in out Trie_Node);
overriding procedure Finalize (Node : in out Trie_Node);
type Search_Trie is record
Not_Found : Natural;
Root : Trie_Node (False);
end record;
Trie_For_Search : Search_Trie;
end Natools.Smaz.Tools;
|