Package org.languagetool.tools
Class RuleMatchesAsJsonSerializer
- java.lang.Object
-
- org.languagetool.tools.RuleMatchesAsJsonSerializer
-
public class RuleMatchesAsJsonSerializer extends Object
Write rule matches and some meta information as JSON.- Since:
- 3.4, public since 3.6
-
-
Constructor Summary
Constructors Constructor Description RuleMatchesAsJsonSerializer()
RuleMatchesAsJsonSerializer(int compactMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
ruleMatchesToJson(List<RuleMatch> matches, String text, int contextSize, DetectedLanguage detectedLang)
String
ruleMatchesToJson(List<RuleMatch> matches, List<RuleMatch> hiddenMatches, String text, int contextSize, DetectedLanguage detectedLang, String incompleteResultsReason)
String
ruleMatchesToJson(List<RuleMatch> matches, List<RuleMatch> hiddenMatches, AnnotatedText text, int contextSize, DetectedLanguage detectedLang, String incompleteResultsReason)
-
-
-
Method Detail
-
ruleMatchesToJson
public String ruleMatchesToJson(List<RuleMatch> matches, String text, int contextSize, DetectedLanguage detectedLang)
-
ruleMatchesToJson
public String ruleMatchesToJson(List<RuleMatch> matches, List<RuleMatch> hiddenMatches, String text, int contextSize, DetectedLanguage detectedLang, String incompleteResultsReason)
- Parameters:
incompleteResultsReason
- use a string that explains why results are incomplete (e.g. due to a timeout) - a 'warnings' section will be added to the JSON. Usenull
if results are complete.- Since:
- 3.7
-
ruleMatchesToJson
public String ruleMatchesToJson(List<RuleMatch> matches, List<RuleMatch> hiddenMatches, AnnotatedText text, int contextSize, DetectedLanguage detectedLang, String incompleteResultsReason)
- Parameters:
incompleteResultsReason
- use a string that explains why results are incomplete (e.g. due to a timeout) - a 'warnings' section will be added to the JSON. Usenull
if results are complete.- Since:
- 4.3
-
-