Skip to content

Instantly share code, notes, and snippets.

@falvhb
Created August 23, 2016 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save falvhb/d8f9f5ac2a5bb2babb7f2bddc442f31b to your computer and use it in GitHub Desktop.
Save falvhb/d8f9f5ac2a5bb2babb7f2bddc442f31b to your computer and use it in GitHub Desktop.
Concept for categorization of sentences in JS

Module: https://www.npmjs.com/package/@kba/simmetrics

threshold = min score for similarity

loop x in sentences loop y in sentences score = comp(x,y) if (score > threshold){ groups[x].push(x).push(y); }

loop g in groups removeDuplicates(g)

print g

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment