Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义词典下的posSeg.Cut("北京市海淀区",true);结果不正确 #52

Open
gzcqy opened this issue Aug 13, 2018 · 1 comment
Open

Comments

@gzcqy
Copy link

gzcqy commented Aug 13, 2018

JiebaNet.Segmenter.WordDictionary.Instance.DeleteWord("北京");
JiebaNet.Segmenter.WordDictionary.Instance.DeleteWord("北京市");
JiebaNet.Segmenter.WordDictionary.Instance.DeleteWord("海淀区");

        JiebaNet.Segmenter.WordDictionary.Instance.AddWord("北京", 6000, "city");
        JiebaNet.Segmenter.WordDictionary.Instance.AddWord("北京市", 6000, "city");
        JiebaNet.Segmenter.WordDictionary.Instance.AddWord("海淀区", 6000, "town");
        //seg.LoadUserDict(AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "userdict.txt");
        JiebaNet.Segmenter.WordDictionary.Instance.ContainsWord("北京");
        JiebaNet.Segmenter.WordDictionary.Instance.ContainsWord("北京市");
        var tokens = posSeg.Cut("北京市海淀区",true);

按道理说cut之后得到的结果应该是
北京市 city
海淀区 town
但实际得到的结果是
北京市 ns
海淀区 ns

@anderscui
Copy link
Owner

anderscui commented Aug 13, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants