Open AndreaSottana opened 3 years ago
Hi @AndreaSottana These are some features that I have not got the permissions to opensource yet. The easiest thing to do is to also feed those individual words to fast_autocomplete. So something like this:
words = {'anti money laundering': {'label': 'anti money laundering'}, 'notification letter': {'label': ''notification letter'}, 'laundering': {'label': 'anti money laundering'}}
By doing so once fast_autocomplete returns the results, you use the labels to show the final results to the user. You will probably end up having some logic after that to maybe show more options. Maybe label is a list of items and you use some other algorithm to decide which one of those to show to the user.
Thanks @seperman will do as you suggest!
One of the feature of the repository, as mentioned in the README, is that
However, I would like to know if there is an easy way to achieve the opposite, i.e. if an "entity" (let's call it a
word
in the context of this repository, even though it's technically made up by multiple words) is searched by typing only the final words that make up this entity, how do we get autocomplete to retrieve it correctly?As an example, let's take this
this would return an empty list
[]
. Is there a way to enable recognition of "anti money laundering" as a single item when the user only types the final word "laundering"? Likewise, if I doI would want to see
[['notification letter'], ['lending institution']]
as results instead of just "lending institution". Not sure if this feature exists, if so, could you explain how to enable it? If it doesn't exist, have you ever considered adding it as a feature?