Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
336 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
languagetool-core/src/main/java/org/languagetool/rules/ngrams/GoogleTokenUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.languagetool.rules.ngrams; | ||
|
||
import org.languagetool.Language; | ||
|
||
import java.util.*; | ||
|
||
public class GoogleTokenUtil { | ||
|
||
|
||
public static List<String> getGoogleTokensForString(String sentence, boolean addStartToken, Language language) { | ||
List<String> tokens = new LinkedList<>(); | ||
for (GoogleToken token : GoogleToken.getGoogleTokens(sentence, addStartToken, language.getWordTokenizer())) { | ||
tokens.add(token.token); | ||
} | ||
return tokens; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+83.9 KB
...n/resources/org/languagetool/resource/speller_rule/models/MORFOLOGIK_RULE_EN_US/spc.model
Binary file not shown.
Oops, something went wrong.