Revisions for "Collapse list of words to get unique root spellings - javascript "

Collapse list of words to get unique root spellings - javascript

We have a bunch of spellings of words from a log. Here we have a list of ways people spell abercrombie & fitch , we are trying to arrive at the number of unique combinations of the words but in some cases people didnt finish typing so we need to be able to aggregate unique root spellings. I know this is confusing but let me show some examples

John

Johnathan

Johna

Joh

Jothnat

in the above 3 we would collapse these to say "Johnathan" is the unique root word all of these were attempting to spell. now if we do something more complex like

Sam

Samantha

Sammy

we would distill this to say there are 2 available roots Samantha and Sammy, as Sam would be collapsed to one of the two longer terms.

My list of real terms is here
https://gist.github.com/quotient/b4707732ac4d0bf07e95491cc8a180bb

We want to be able to paste in a bunch of terms like this to a text box and have it output all of the unique root terms from it. Lets assume case doesn't matter in your final solution.

Collapse list of words to get unique root spellings - javascript
We have a bunch of spellings of words from a log. Here we have a list of ways people spell abercrombie & fitch , we are trying to arrive at the number of unique combinations of the words but in some cases people didnt finish typing so we need to be able to aggregate unique root spellings. I know this is confusing but let me show some examples `John Johnathan Johna Joh Jothnat ` in the above 3 we would collapse these to say "Johnathan" is the unique root word all of these were attempting to spell. now if we do something more complex like `Sam Samantha Sammy ` we would distill this to say there are 2 available roots Samantha and Sammy, as Sam would be collapsed to one of the two longer terms. My list of real terms is here `https://gist.github.com/quotient/b4707732ac4d0bf07e95491cc8a180bb` We want to be able to paste in a bunch of terms like this to a text box and have it output all of the unique root terms from it. Lets assume case doesn't matter in your final solution.
Back to question