UNPKG

node-ac

Version:

A nodejs implementation of the aho corasick pattern search algorithm

25 lines (19 loc) 557 B
var nodeac = require('./build/Release/nodeac'); module.exports.reset = function(){ nodeac.reset(); }; module.exports.addDictionary = function(dicFile){ nodeac.addDictionary(dicFile); }; module.exports.addCheckItem = function(wrong,right,type){ nodeac.addCheckItem(wrong,right,type); }; module.exports.buildChecker = function(){ nodeac.buildChecker(); }; module.exports.checkText = function(text,callback){ nodeac.checkText(text,callback); }; module.exports.checkTextFile = function(textFile,callback){ nodeac.checkTextFile(textFile,callback); };