Given a trie, find all occurrences of a word in the trie in a
string.
Like searching a string for a substring, except that the substring is
any word in a trie.
Functions: match Find longest key in a trie matching the
beginning of the string. match_all Find all keys in a trie matching
the beginning of the string. find Find keys in a trie matching
anywhere in a string. find_words Find keys in a trie matching whole
words in a string.
longest key or None
|
match(string,
trie)
Find the longest key in the trie that matches the beginning of the
string. |
source code
|
|
list of keys
|
match_all(string,
trie)
Find all the keys in the trie that matches the beginning of the
string. |
source code
|
|
list of tuples (key, start, end)
|
find(string,
trie)
Find all the keys in the trie that match anywhere in the string. |
source code
|
|
list of tuples (key, start, end)
|
|