1.1.0 • Published 7 years ago
@lolojs/htmlindexer v1.1.0
const HtmlIndexer =require('./htmlIndexer'); const indexer = new HtmlIndexer();
indexer.IndexDocument("tests/test.html");
indexer.on("indexFinished", () => {
for (var key of indexer.tokens.keys()) {
console.log(`Term : ${key} Frequency : ${indexer.tokens.get(key)}`);
}
});
per chunk and the output is json based with format { term: 'test', freq: 1, isFirstChunk: true, isLastChunk: true }