You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the feature of the repository, as mentioned in the README, is that
Elasticsearch's Autocomplete suggestor does not handle any sort of combination of the words you have put in. For example Fast Autocomplete can handle 2018 Toyota Camry in Los Angeles when the words 2018, Toyota Camry, Los Angeles are seperately fed into it. While Elasticsearch's autocomplete needs that whole sentence to be fed to it to show it in Autocomplete results.
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
from fast_autocomplete import AutoComplete
words = {'anti money laundering': {}, 'notification letter': {}, 'lending institution': {}}
autocomplete = AutoComplete(words=words)
print(autocomplete.search(word='laundering'))
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 do
print(autocomplete.search(word='le'))
I 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?
The text was updated successfully, but these errors were encountered:
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:
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.
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?The text was updated successfully, but these errors were encountered: