vunb/vntk

load custom model

vunb opened this issue · 1 comments

vunb commented

Please open vntk to have ability load custom model for word_sent, chunking, ner.

For example:

var tagger = new vntk.NER([model_filename]);
tagger.tag('text input');
vunb commented

Considering mark deprecated apis?

/**
 * Mark apis are deprecated ?
 */

Object.defineProperty(exports, 'word_sent', {
    get: util.deprecate(() => new WordSent(), 'vntk.word_sent is deprecated. Please use var ws = new vntk.WordSent([model]);')
});

Object.defineProperty(exports, 'pos_tag', {
    get: util.deprecate(() => new POSTag(), 'vntk.pos_tag is deprecated. Please use var pos = new vntk.POSTag([model]);')
});

Object.defineProperty(exports, 'chunking', {
    get: util.deprecate(() => new Chucking(), 'vntk.chunking is deprecated. Please use var chunking = new vntk.Chunking([model]);')
});

Object.defineProperty(exports, 'ner', {
    get: util.deprecate(() => new NER(), 'vntk.ner is deprecated. Please use var ner = new vntk.NER([model]);')
});