2013/9/3 Daniel Naber <[email protected]>
> Hi,
>
> LT only supports plain text, but we should make it easier for users of
> our API to check text of any format. I'm looking for feedback on this
> idea how we could do that:
>
> We could add a new method JLanguageTool.check(AnnotatedText). This
> AnnotatedText object contains a list of tokens and each token is either
> text or markup. For an XML snippet like "hi <b>there</b>", it could be
> created like this:
>
> new AnnotatedText()
> .addText("hi ")
> .addMarkup("<b>")
> .addText("there")
> .addMarkup("</b>");
>
> Internally, LT will only check the text part but calculate the error
> positions so that they consider text and markup. The user will need to
> decide what's markup and what's text. This way LT still doesn't need to
> know anything about input formats.
>
> Does this make sense?
>
>
I think it does. We could then make some "parsers" create AnnotatedText
objects from input streams, so we can improve the usage while, as you said,
LT doesn't need to know anything about input formats.
--
< Xavi Ivars >
< http://xavi.ivars.me >
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Languagetool-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/languagetool-devel