posibly
v0.0.3
Published
Compare and Convert Part-of-Speech Tagged Sentences to Expected Grammar.
Downloads
3
Maintainers
Readme
Posibly
Compare and Convert Part-of-Speech Tagged Sentences to Expected Grammar.
Install
npm install --save posibly
Initialize
const Posibly = require('posibly');
const posibly = new Posibly(['V', 'DT', 'N']);
Compare
// using posibly from above
const tagged = [ [ 'eat', 'V' ], [ 'food', 'N' ] ];
const editPath = posibly.editPath(tagged);
// editPath.distance = 1
Convert
// using editPath from above
const retagged = editPath.retag();
/*
retagged = [
[ 'eat', 'V' ],
[ null, 'DT' ],
[ 'food', 'N' ],
]
*/
Copyright 2017, Kyle Stafford (MIT License).