@@ -22,10 +22,9 @@ cdef extern from "keyvi/dictionary/dictionary.h" namespace "keyvi::dictionary":
22
22
23
23
cdef cppclass Dictionary:
24
24
# wrap-doc:
25
- # Keyvi dictionary, basically a set of key values. Keyvi dictionaries
26
- # are immutable containers, created by a previours compile run.
27
- # Immutability has performance benefits. If you are looking for an
28
- # updateable container, have a look at keyvi index.
25
+ # Keyvi dictionary, an immutable containers storing key value pairs, optimized
26
+ # for size, lookup performance and special lookp use cases.
27
+ # A keyvi dictionary has to be created by a previous compile run.
29
28
#
30
29
# Keyvi dictionaries allow multiple types of approximate and completion
31
30
# matches due to its internal FST based data structure.
@@ -40,57 +39,63 @@ cdef extern from "keyvi/dictionary/dictionary.h" namespace "keyvi::dictionary":
40
39
_MatchIteratorPair GetFuzzy (libcpp_utf8_string key, int32_t max_edit_distance, size_t minimum_exact_prefix) except + # wrap-as:match_fuzzy
41
40
_MatchIteratorPair GetPrefixCompletion (libcpp_utf8_string key) except + # wrap-as:complete_prefix
42
41
# wrap-doc:
43
- # complete the given key to full matches by matching the given key as
44
- # prefix. In case the used dictionary supports inner weights, the
45
- # completer traverses the dictionary according to weights. If weights
46
- # are not available the dictionary gets traversed in byte-order.
42
+ # Complete the given key to full matches(prefix matching)
43
+ # In case the used dictionary supports inner weights, the
44
+ # completer traverses the dictionary according to weights,
45
+ # otherwise byte-order.
46
+
47
47
_MatchIteratorPair GetPrefixCompletion (libcpp_utf8_string key, size_t top_n) except + # wrap-as:complete_prefix
48
48
# wrap-doc:
49
- # complete the given key to full matches by matching the given key as
50
- # prefix. This version of prefix completions ensure the return of the
51
- # top name completions. Due to depth-first traversal the traverser
49
+ # Complete the given key to full matches(prefix matching)
50
+ # and return the top n completions.
51
+ # In case the used dictionary supports inner weights, the
52
+ # completer traverses the dictionary according to weights,
53
+ # otherwise byte-order.
54
+ #
55
+ # Note, due to depth-first traversal the traverser
52
56
# immediately yields results when it visits them. The results are
53
57
# neither in order nor limited to n. It is up to the caller to resort
54
58
# and truncate the lists of results.
55
59
# Only the number of top completions is guaranteed.
60
+
56
61
_MatchIteratorPair GetMultiwordCompletion (libcpp_utf8_string key) except + # wrap-as:complete_multiword
57
62
# wrap-doc:
58
- # complete the given key to full matches by matching the given key as
59
- # multiword. The key can consist of multiple tokens separated by space.
60
- # For matching it gets tokenized put back together bag-of-words style.
61
- # The dictionary must be created the same way.
63
+ # Complete the given key to full matches after whitespace tokenizing.
62
64
# In case the used dictionary supports inner weights, the
63
- # completer traverses the dictionary according to weights. If weights
64
- # are not available the dictionary gets traversed in byte-order.
65
+ # completer traverses the dictionary according to weights,
66
+ # otherwise byte-order.
67
+
65
68
_MatchIteratorPair GetMultiwordCompletion (libcpp_utf8_string key, size_t top_n) except + # wrap-as:complete_multiword
66
69
# wrap-doc:
67
- # complete the given key to full matches by matching the given key as
68
- # multiword. The key can consist of multiple tokens separated by space.
69
- # For matching it gets tokenized put back together bag-of-words style.
70
- # The dictionary must be created the same way.
70
+ # Complete the given key to full matches after whitespace tokenizing
71
+ # and return the top n completions.
71
72
# In case the used dictionary supports inner weights, the
72
- # completer traverses the dictionary according to weights. If weights
73
- # are not available the dictionary gets traversed in byte-order.
73
+ # completer traverses the dictionary according to weights,
74
+ # otherwise byte-order.
75
+ #
76
+ # Note, due to depth-first traversal the traverser
77
+ # immediately yields results when it visits them. The results are
78
+ # neither in order nor limited to n. It is up to the caller to resort
79
+ # and truncate the lists of results.
80
+ # Only the number of top completions is guaranteed.
81
+
74
82
_MatchIteratorPair GetFuzzyMultiwordCompletion (libcpp_utf8_string key, int32_t max_edit_distance) except + # wrap-as:complete_fuzzy_multiword
75
83
# wrap-doc:
76
- # complete the given key to full matches by matching the given key as
77
- # multiword allowing up to max_edit_distance distance(Levenshtein).
78
- # The key can consist of multiple tokens separated by space.
79
- # For matching it gets tokenized put back together bag-of-words style.
80
- # The dictionary must be created the same way.
84
+ # Complete the given key to full matches after whitespace tokenizing,
85
+ # allowing up to max_edit_distance distance(Levenshtein).
81
86
# In case the used dictionary supports inner weights, the
82
- # completer traverses the dictionary according to weights. If weights
83
- # are not available the dictionary gets traversed in byte-order.
87
+ # completer traverses the dictionary according to weights,
88
+ # otherwise byte-order.
89
+
84
90
_MatchIteratorPair GetFuzzyMultiwordCompletion (libcpp_utf8_string key, int32_t max_edit_distance, size_t minimum_exact_prefix) except + # wrap-as:complete_fuzzy_multiword
85
91
# wrap-doc:
86
- # complete the given key to full matches by matching the given key as
87
- # multiword allowing up to max_edit_distance distance(Levenshtein).
88
- # The key can consist of multiple tokens separated by space.
89
- # For matching it gets tokenized put back together bag-of-words style.
90
- # The dictionary must be created the same way.
92
+ # Complete the given key to full matches after whitespace tokenizing,
93
+ # allowing up to max_edit_distance distance(Levenshtein) except for
94
+ # a given exaxt prefix which must match exaxt.
91
95
# In case the used dictionary supports inner weights, the
92
- # completer traverses the dictionary according to weights. If weights
93
- # are not available the dictionary gets traversed in byte-order.
96
+ # completer traverses the dictionary according to weights,
97
+ # otherwise byte-order.
98
+
94
99
_MatchIteratorPair GetAllItems () # wrap-ignore
95
100
_MatchIteratorPair Lookup(libcpp_utf8_string key) # wrap-as:search
96
101
_MatchIteratorPair LookupText(libcpp_utf8_string text) # wrap-as:search_tokenized
0 commit comments