Algorithm used for automatic guessing

What algorithms or data structures are used in the automatic offer functions?

It seems that the editing distance will be used, but it is also necessary to consider the frequency or rating associated with each word. For example, consider the tag parameter on the SO Ask Question page.

+4
source share
3 answers

You can use trie :

  • each node from trie has all children that start with the value itself, for example: from "in" node you can visit the subtree of all lines starting with "in"
  • in your case, you need to consider the assessment so that you can first collect all the children (crossing the tree), and then sort them according to the score or any other.
  • If you really want to keep the Hamming distance (edit distance), you can adapt the trie to create children to suit it.
+4
source

Check out the links provided in the answers to this question autocomplete autocomplete, articles, strategies, etc. You can find what you are looking for is.

+1
source

hi racha, Outsourcing system is working on a recursive algorithm. Google and facebook implement this algorithm in their education. facebook use graph + recursive type alog. I give you an example for this. if you use type f in the facebook search bar, you can see that facebook is a search for how many people or pages you like or what to add. the first letter is f, then it shows the sentence

0
source

Source: https://habr.com/ru/post/1303630/


All Articles