sentence-compare
v1.0.6
Published
compare tow sentences and decide which words
Downloads
2
Readme
sentence-compare
A comparison between two English sentences.
Installation
$ npm install sentence-compare
Usage
Enter a standard statement, and a custom statement that needs to compare to a standard statement
Example:
var sentenceCompare = require('sentence-compare')
sentenceCompare('Enjoy the freedom of life', 'Enjoy there of life bower') // sentenceCompare(standardSentence, customSentence)
/* output:
{ content:
[ 'Enjoy',
' ',
{ type: 'wrong', content: 'the' },
' ',
{ type: 'wrong', content: 'freedom' },
' ',
'of',
' ',
'life' ],
rate: 0.6 }
*/