I'd like to find JavaScript libraries or general algorithms (write my own library) to be able to match strings in my array with over 2000 strings. In Discord you can leave out letters and it'll still be able to match against someone so I'd like to be able to do the same. For example, searching "js" would match against "JavaScript" in my word bank. Or searching "ccard" would match against "credit card".
I would like the matching results to be ranked based on entropy or something. For example, searching "nattorice" would rank the result of "Natto with Rice" to be better than "Natural Cotton Fabric Selection" because the letters hit are closer grouped together rather than spread apart.
I don't know what to search in google to help me figure out some implementation that is efficient.