I need some JS library, which could match category by long text request.
For example, I have categories Apples, Red Apples, Green Apples, Oranges and request Red Juicy Apple 1 Kilo from Spain. In this case the category should be Red Apples. So, simple loop and contains() is not enough.
I've searched some libs like https://github.com/NaturalNode/natural, but classification not suitable because in my case I do not know all possible requests and could not train it.
Maybe I need to stem request, calculate words distances request to categories and sort it?
Please help me with this anti-full-text-search.
 
    