Package org.languagetool.rules
Class ScoredConfusionSetLoader
java.lang.Object
org.languagetool.rules.ScoredConfusionSetLoader
Loads a confusion set from a plain text file (UTF-8). See
neuralnetwork_confusion_sets.txt
for a description of the file format.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static List<ConfusionString>
getConfusionStrings
(String[] parts) private static boolean
ignoreLine
(String line) static List<ScoredConfusionSet>
loadConfusionSet
(InputStream stream) private static String[]
private static @NotNull ScoredConfusionSet
toScoredConfusionSet
(String[] parts, List<ConfusionString> confusionStrings)
-
Field Details
-
CHARSET
- See Also:
-
-
Constructor Details
-
ScoredConfusionSetLoader
private ScoredConfusionSetLoader()
-
-
Method Details
-
loadConfusionSet
- Throws:
IOException
-
toScoredConfusionSet
@NotNull private static @NotNull ScoredConfusionSet toScoredConfusionSet(String[] parts, List<ConfusionString> confusionStrings) -
splitLine
-
getConfusionStrings
-
ignoreLine
-