Skip to content

Commit

Permalink
Fixed dict load error, fixed #38
Browse files Browse the repository at this point in the history
  • Loading branch information
hotoo committed May 14, 2015
1 parent a72bbb0 commit 2845c78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

---

[![NPM version](https://badge.fury.io/js/pinyin.png)](http://badge.fury.io/js/pinyin)
[![NPM version](https://badge.fury.io/js/pinyin.png)](https://www.npmjs.com/package/pinyin)
[![spm package](http://spmjs.io/badge/pinyin)](http://spmjs.io/package/pinyin)
[![Build Status](https://secure.travis-ci.org/hotoo/pinyin.png?branch=master)](https://travis-ci.org/hotoo/pinyin)
[![Coverage Status](https://coveralls.io/repos/hotoo/pinyin/badge.png?branch=master)](https://coveralls.io/r/hotoo/pinyin)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "pinyin",
"version": "2.4.1",
"version": "2.4.2",
"description": "汉语拼音转换工具。",
"keywords": [
"拼音",
"汉语",
"Pinyin"
],
"homepage": "http://pinyin.hotoo.me/",
Expand Down
6 changes: 3 additions & 3 deletions src/pinyin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ function buildPinyinCache(dict_combo){
if(isNode){
jieba = module['require']('nodejieba');
jieba.loadDict(
"./node_modules/nodejieba/dict/jieba.dict.utf8",
"./node_modules/nodejieba/dict/hmm_model.utf8",
"./node_modules/nodejieba/dict/user.dict.utf8");
__dirname + "/../node_modules/nodejieba/dict/jieba.dict.utf8",
__dirname + "/../node_modules/nodejieba/dict/hmm_model.utf8",
__dirname + "/../node_modules/nodejieba/dict/user.dict.utf8");

// 词语拼音库。
PHRASES_DICT = module["require"]("./phrases-dict");
Expand Down

0 comments on commit 2845c78

Please sign in to comment.