How do I make so array has words, now I have a input output should be the most similar to input from the array. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How do I make so array has words, now I have a input output should be the most similar to input from the array.

How do I make so like a array of words; const Words = [ "word one", "word two" ] Now I have a input as "word o" I want get output which is the most similar to the input. Also how do I make it weighted so if same it will chose higher one.

9th Nov 2022, 11:22 AM
heaker Gamer
1 Answer
0
Here is a code that does similar to what you asked for.. Similarity Code is from stackoverflow I added weighted matching https://code.sololearn.com/WY9PCDri6I1F/?ref=app
18th Nov 2022, 11:37 AM
Virtual Pixel
Virtual Pixel - avatar