MycroftAI / adapt

Adapt Intent Parser
Apache License 2.0
710 stars 154 forks source link

Trie's `max_threshold` is documented as int, seems to be float #111

Closed PLNech closed 2 years ago

PLNech commented 3 years ago

https://github.com/MycroftAI/adapt/blob/7c1e444cfbe1581ff97d4ef80752f8257a95f64c/adapt/tools/text/trie.py#L143-L149

(_Also note that edit_distance and max_edit_distance are described as not 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:

Happy to send a PR if you agree with the above :raised_hands: