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

比较的方法应该要考虑相等的情况 #100

Open
love-moon opened this issue Sep 5, 2019 · 2 comments
Open

比较的方法应该要考虑相等的情况 #100

love-moon opened this issue Sep 5, 2019 · 2 comments

Comments

@love-moon
Copy link

@Override
public int compareTo(Keyword o)
{
	return this.tfidfvalue-o.tfidfvalue>0?-1:1;
}

这里报错过, Comparison method 什么的,我改成相等返回0,其它不变就正常了

@love-moon
Copy link
Author

位于src/main/java/com/qianxinyao/analysis/jieba/keyword/Keyword.java

@MeetFuture
Copy link

return Double.compare(this.tfidfvalue, o.tfidfvalue);

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