Back to LanguageTool Homepage - Privacy - Imprint

Writing regular expressions for tokens

I wanted to repeat certain sequence of tokens.For eg:

    <token postag="JJ|NN:.*" postag_regexp="yes" min="0" max="5">
    <token postag="CC" min="0"/>

Both this token need to repeated together. Is there any way it is supported in the LT?

Unfortunately not. For this, we’d need a real regex engine for tokens, and we don’t have that.

Thanks for the information.

Note: you can write Java rules in LT - any logic is possible there.

Till now, I had only been adding grammar rules in a separate xml file. Can you guide or refer me to the process for where and how to add JAVA rules (also what commands to run for compiling them)?

I would start here http://wiki.languagetool.org/development-overview#toc19