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

word1.3 Word类的getPartOfSpeech()方法始终返回null #76

Open
CBM1014 opened this issue Mar 9, 2019 · 0 comments
Open

word1.3 Word类的getPartOfSpeech()方法始终返回null #76

CBM1014 opened this issue Mar 9, 2019 · 0 comments

Comments

@CBM1014
Copy link

CBM1014 commented Mar 9, 2019

word版本1.3
复现可以试试下面的代码。

String msg = "今晚不能摸鱼了,要好好努力哦";
List<Word> words = WordSegmenter.segWithStopWords(msg);
            StringBuilder sb = new StringBuilder("你刚才说的词有:");
            for(Word x:words){
                sb.append(x.toString()+"("+x.getPartOfSpeech()+"),");
            }
System.out.println(sb.toString());

返回的结果是
你刚才说的词有:今晚(null),不能(null),摸鱼(null),了(null),要(null),好好(null),努力(null),哦(null),
不知是使用上还是方法内部出了问题...getPartOfSpeech()方法始终返回了null。

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

1 participant