Skip to content

Commit

Permalink
[dict] fix npm test for using cppjieba/dict
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyiwu committed Jul 16, 2024
1 parent 70ed827 commit b71d3a1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ var nodejieba = require(binding_path);

var isDictLoaded = false;

DICT_DIR = __dirname + "/submodules/cppjieba/dict/";

var exports ={
DEFAULT_DICT: __dirname + "/dict/jieba.dict.utf8",
DEFAULT_HMM_DICT: __dirname + "/dict/hmm_model.utf8",
DEFAULT_USER_DICT: __dirname + "/dict/user.dict.utf8",
DEFAULT_IDF_DICT: __dirname + "/dict/idf.utf8",
DEFAULT_STOP_WORD_DICT: __dirname + "/dict/stop_words.utf8",
DEFAULT_DICT: DICT_DIR + "jieba.dict.utf8",
DEFAULT_HMM_DICT: DICT_DIR + "hmm_model.utf8",
DEFAULT_USER_DICT: DICT_DIR + "user.dict.utf8",
DEFAULT_IDF_DICT: DICT_DIR + "idf.utf8",
DEFAULT_STOP_WORD_DICT: DICT_DIR + "stop_words.utf8",

load: function (dictJson) {
if (!dictJson) {
Expand Down

0 comments on commit b71d3a1

Please sign in to comment.