node.js - Algorithm for textual context matching in Javascript -


i have implement algorithm node.js app i'll getting strings , based on context i'll have decide if match or not. take taxi service example. person asking taxi can considered string one. taxi driver willing offer service considered string2. algorithm should process these 2 strings , case return match. have lot of test data train algorithm on, if need be.

so far have come across bayes document classification algorithm , think job done.

i wondering if there easier way this, or existing npm module use?

example strings:

s1 : looking apartments in new york s2 : our website lists apartments sale in new york. outcome : match.

s1 : looking restaurants in new york s2 : john sells computers. outcome : no match.

you can use levenshtein distance, give number of corrections make strings match, can convert percentages, approximate match.

here javascript implementation , can used nodejs module.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -