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
ML-based suggestions ordering (AGPL dependency removed) #1115
ML-based suggestions ordering (AGPL dependency removed) #1115
Conversation
…odels evaluator](https://github.com/komiya-atsushi/xgboost-predictor-java), added models.
…tool into spelling-corrections-ordering # Conflicts: # languagetool-core/pom.xml # languagetool-core/src/main/java/org/languagetool/rules/spelling/morfologik/suggestions_ordering/SuggestionsOrderer.java # languagetool-core/src/main/java/org/languagetool/rules/spelling/morfologik/suggestions_ordering/SuggestionsOrdererConfig.java # languagetool-core/src/test/java/org/languagetool/rules/spelling/morfologik/suggestions_ordering/SuggestionsOrdererTest.java # languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java
…etool into spelling-corrections-ordering
Now using the https://github.com/komiya-atsushi/xgboost-predictor-java lib, it is licensed under the Apache 2.0. Is it Ok? |
Thanks, the Apache 2.0 license is fine. |
I will merge this pull request today. |
@@ -189,6 +196,23 @@ | |||
<scope>test</scope> | |||
</dependency> | |||
|
|||
<!--xgboost-related pmml dependencies--> | |||
<!--<dependency>--> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed, or is there a reason to only comment them out?
@@ -0,0 +1,18 @@ | |||
package org.languagetool.languagemodel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a license header here (and all the other new files)
|
||
private boolean MLAvailable = true; | ||
|
||
private static SuggestionsOrderer.NGramUtil nGramUtil = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these have to be static?
int startPos = sentence.indexOf(word); | ||
int wordLength = word.length(); | ||
List<String> suggestionsOrdered = suggestionsOrderer.orderSuggestionsUsingModel(suggestions, word, languageTool.getAnalyzedSentence(sentence), startPos, wordLength); | ||
assertTrue(suggestionsOrdered.containsAll(suggestions)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this assert check the order instead of just whether the items exist, or am I missing something?
Fixed #1020
AGPL dependency removed