Package org.languagetool.dev.wikipedia
Class SuggestionReplacer
java.lang.Object
org.languagetool.dev.wikipedia.SuggestionReplacer
Applies the rule suggestions to a text, considering a mapping so the
suggestion can be applied to the original markup of a text.
-
Constructor Summary
ConstructorsConstructorDescriptionSuggestionReplacer(PlainTextMapping textMapping, String originalText) SuggestionReplacer(PlainTextMapping textMapping, String originalText, ErrorMarker errorMarker) -
Method Summary
Modifier and TypeMethodDescriptionApplies the suggestions from the rule to the original text.
-
Constructor Details
-
SuggestionReplacer
- Parameters:
originalText- the original text that includes markup
-
SuggestionReplacer
public SuggestionReplacer(PlainTextMapping textMapping, String originalText, ErrorMarker errorMarker) - Since:
- 2.6
-
-
Method Details
-
applySuggestionsToOriginalText
Applies the suggestions from the rule to the original text. For rules that have no suggestion, a pseudo-correction is generated that contains the same text as before.
-