Mention max_threshold as float and its role as threshold for retaining matches based on confidence
Correct affirmation that edit_distance and max_edit_distance are not used.
Update Trie's documentation to fix max_threshold's typing, and replace ? by a similar description of their functionality (potentially copied from TrieNode.lookup's docs)
Happy to send a PR if you agree with the above :raised_hands:
https://github.com/MycroftAI/adapt/blob/7c1e444cfbe1581ff97d4ef80752f8257a95f64c/adapt/tools/text/trie.py#L143-L149
TrieNode.lookup
, here its default value is0.0
, but it's not in the docstrings anymore: https://github.com/MycroftAI/adapt/blob/7c1e444cfbe1581ff97d4ef80752f8257a95f64c/adapt/tools/text/trie.py#L31-L41(_Also note that
edit_distance
andmax_edit_distance
are described asnot currently used
, but are actually used e.g. on lines 65-66:_)https://github.com/MycroftAI/adapt/blob/7c1e444cfbe1581ff97d4ef80752f8257a95f64c/adapt/tools/text/trie.py#L65-L66
As for
max_threshold
, it's finally used there in a float comparison:https://github.com/MycroftAI/adapt/blob/7c1e444cfbe1581ff97d4ef80752f8257a95f64c/adapt/tools/text/trie.py#L67
Thus, I believe we should:
TrieNode.lookup
's documentation tomax_threshold
as float and its role as threshold for retaining matches based on confidenceedit_distance
andmax_edit_distance
are not used.Trie
's documentation to fixmax_threshold
's typing, and replace?
by a similar description of their functionality (potentially copied fromTrieNode.lookup
's docs)Happy to send a PR if you agree with the above :raised_hands: