Back to LanguageTool Homepage - Privacy - Imprint

Draft AsciiDoc integration

Hi!

We use AsciiDoc at work, and I was interested in getting LanguageTool working on checking AsciiDoc files. I’ve created a proof-of-concept here:

Is anyone interested in something like this? This seems to roughly work, but it still needs a ton of work to be usable. I wonder if there’s any interest.

I tried to create a native image executable of this so it can be used without a JDK, but I hit some issues with LanguageTool requiring further work to work as a native image. I have a PR about that.

I also wonder if there’s some specific projects to integrate LanguageTool + markup formats with editors that I could leverage…

Cheers,

Álex

Another issue I’m finding is that we use a lot of “inline” code, and I can’t think of a good way to handle it.

For example, we have sentences like the following “create a ‘foobar’ assignment”. We tag ‘foobar’ using AsciiDoc backticks, and I use AnnotatedTextBuilder.addMarkup to skip it, but that causes issues with for example the a/an rule, which sees “a assignment” and complains. Or also if a sentence ends with some tagged code, we get “Don’t put a space before the full stop”, because the tagged code is whitespace for LanguageTool.

Is there some approach I should follow for this?

In theory, you can make a disambiguation rule that will ignore spelling in a specified context. But, as I found yesterday, the EN_A_VS_AN rule does not work correctly (https://github.com/languagetool-org/languagetool/issues/5986).