Back to LanguageTool Homepage - Privacy - Imprint

Development of JAVA rules

I have recently started working with languagetool and I was wondering if there is a step-by-step guide on how to develop JAVA rules. I read the development website but It is not clear how I can add in JAVA rules. Do I need to download the standalone version and unzip it and then add rules or do I need to fork the whole GitHub and then add in rules.

Also, the section where it is written that if you are using an API you can add JAVA Rules by JLanguageTool.addRule() method how to go about it.

I am sending my text to API in a way mentioned below, how to add in my own JAVA rules in such a scenario.

check = pylanguagetool.api.check(row,api_url=‘http://localhost:9999/v2/’, lang=‘de-DE’,disabled_categories = [‘TYPOGRAPHY,WIKIPEDIA’], pwl = pwl)

On the whole, I think the documentation on XML rules is much better than the development of JAVA rules, with a demo website and videos. It would be helpful if such content is also available for JAVA rules development as well.

Sorry, I think is all we have. You’d need to check out the source and import it into your Java IDE if you want to add rules. pylanguagetool.api.check seems to be a Python-based API, it won’t be possible to add rules using that.

I am new in LanguageTool too! I forked the whole project and made there any changes. In addition, I have found that using the Abstract rules in languagetool/languagetool-core/src/main/java/org/languagetool/rules as a base for your new rules and the already created rules of your language as drivers, is extremely helpful.

Hi George, welcome to LT. We’re looking forward to any contributions.

1 Like

Thanks! My first pull request got accepted yesterday! and I am looking forward to more contributions