Giter Site home page Giter Site logo

自定义词不起作用? about jieba.net HOT 4 OPEN

anderscui avatar anderscui commented on May 27, 2024
自定义词不起作用?

from jieba.net.

Comments (4)

anderscui avatar anderscui commented on May 27, 2024

@kingwa5 自定义词典这里,我用你的代码测下来是正常的,没有重现。

另外,你说的是哪个例子看不出区别?

from jieba.net.

23df avatar 23df commented on May 27, 2024

更新:
找到bug所在了!原来是custom dict的路径写错了,jieba没有找到这个文件,按理说应该报错的,但没有报错,导致我一直没发现是路径的问题。现在segmenter.LoadUserDict功能正常了。

原帖:
.NET4.5, 和你出现了相同的问题,segmenter.LoadUserDict没有报错,但是也没有起作用(segmenter.Cut和posSeg.Cut均无效)。但使用segmenter.AddWord添加的自定义词典就能起作用。你们解决了吗?

from jieba.net.

ArmyMedalMei avatar ArmyMedalMei commented on May 27, 2024
//添加自定义词语
segmenter.LoadUserDict("shu_biao_tong_industry.txt"); 

请问一下,.NET 控制台的情况下 采用相对路径时,是这样设置自定义字典路径的吗?我这样设置了之后还是不能分词,另,这个文件是放在Resources文件夹下的!
我测试了传入全路径的情况依然没有效果!

from jieba.net.

rootlee88 avatar rootlee88 commented on May 27, 2024

我测试的是CutForSearch才有效,Cut无效

from jieba.net.

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.