Class AnnotatedTextBuilder

java.lang.Object
org.languagetool.markup.AnnotatedTextBuilder

public class AnnotatedTextBuilder extends Object
Use this builder to create input of text with markup for LanguageTool, so that it can check only the plain text parts and ignore the markup, yet still calculate the positions of errors so that they refer to the complete text, including markup.

It's up to you to split the input into parts that are plain text and parts that are markup.

For example, text with XML markup like

   Here is <b>some text</b>
 

needs to be prepared like this:

 new AnnotatedTextBuilder()
   .addText("Here is ").addMarkup("<b>").addText("some text").addMarkup("</b>")
   .build()
 
Since:
2.3