GithubHelp home page GithubHelp logo

Comments (6)

yanyiwu avatar yanyiwu commented on July 16, 2024

好的,非常感谢你的反馈,可能是对node某些版本兼容不太好,我今天查查。

from nodejieba.

bolasblack avatar bolasblack commented on July 16, 2024

@aszxqw 好的,谢谢你

from nodejieba.

yanyiwu avatar yanyiwu commented on July 16, 2024
(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.

bolasblack avatar bolasblack commented on July 16, 2024

@aszxqw 喔,是的,确实是我没看仔细文档,用错了方法,不好意思……

不过还是请在 query 系的方法里加一个检查,不然的话不容易发现这个问题,我之前还以为是 node 出了 bug 呢,后来才想起来 node-jieba 是用 c++ 写的 :P

from nodejieba.

yanyiwu avatar yanyiwu commented on July 16, 2024

@bolasblack 是的,确实检查不严,你的建议很对。会找个时间改进。

from nodejieba.

bolasblack avatar bolasblack commented on July 16, 2024

谢谢你

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.