Comments (6)
好的,非常感谢你的反馈,可能是对node某些版本兼容不太好,我今天查查。
from nodejieba.
@aszxqw 好的,谢谢你
from nodejieba.
(function() {
var jieba = require('nodejieba')
// 用法1
//jieba.queryLoadDict(
// "./node_modules/nodejieba/dict/jieba.dict.utf8",
// "./node_modules/nodejieba/dict/hmm_model.utf8",
// 3, // queryCut分词的粒度
// "./node_modules/nodejieba/dict/user.dict.utf8"
// )
// 用法2
jieba.queryLoadDict(
"./node_modules/nodejieba/dict/jieba.dict.utf8",
"./node_modules/nodejieba/dict/hmm_model.utf8"
)
jieba.queryCut('你好世界', function(wordList) {
console.log(wordList.join(' '))
})
}).call(this);
和版本无关。
是使用方法错了。
应该是 jieba.queryLoadDict 而不是 jieba.loadDict 。
from nodejieba.
@aszxqw 喔,是的,确实是我没看仔细文档,用错了方法,不好意思……
不过还是请在 query 系的方法里加一个检查,不然的话不容易发现这个问题,我之前还以为是 node 出了 bug 呢,后来才想起来 node-jieba 是用 c++ 写的 :P
from nodejieba.
@bolasblack 是的,确实检查不严,你的建议很对。会找个时间改进。
from nodejieba.
谢谢你
On Feb 6, 2015, at 2:07 PM, Yanyi Wu [email protected] wrote:
@bolasblack https://github.com/bolasblack 是的,确实检查不严,你的建议很对。会找个时间改进。
—
Reply to this email directly or view it on GitHub #12 (comment).
from nodejieba.
Related Issues (20)
- Unable to compile on Windows 11 with node-jieba 2.5.2/2.6.0 HOT 3
- The reason why installation failed on CentOS may be the version number
- 在老项目中 node 5.1.0,nodejieba v1.0.0,执行不下去的问题
- 老大,啥时候能解决v2.6.0发版问题呀 HOT 5
- README 中的文章都访问不了,大佬可以更新一下嘛,想看看实现思路 HOT 1
- 请问有没有同学遇到alinode(fully-static)动态加载的问题
- unable to install [email protected] for arch=aarch HOT 2
- Cannot build nodejieba with Node 18 HOT 2
- can not build in electron HOT 2
- 在線演示的網站倒了,打算轉用github pages或其他工具嗎?
- Does not segment 民不畏死 from the Tao Te Ching?
- Lacking of maintenance HOT 7
- Dict update
- 安装2.5.2失败 HOT 15
- 从2.6.0降低版本安装2.5.2 服务器报错 error: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found HOT 1
- 安装,找不到 nodejieba包 HOT 1
- cannot build in electron 20, node 16
- nodejieba.node is not a valid Win32 application HOT 5
- npm i error HOT 1
- 为什么windows不支持了,binary没法下载
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodejieba.