Compare two arrays and show number of matches in a percentage value
I'm assuming you have already broken your text down into its individual words and stripped the punctuation marks, etc, in your text array?

If so, the percentage of words from the given text array that match your word-list should be pretty easy to find.

Something along the lines of:

function matchPerc(wordList, text){
  var matches = text.filter((word)=&gt;{return wordList.includes(word)}).length
  return (matches / text.length * 100).toFixed(2) + '%'
}