'Can we skip or remove grammar check with JlanguageTool?
Lets take an example
sentence :
i am good.how are you?
Correction :
I am good. How are you?
Expected :
i am good.how are you? (Do not want any suggestion if there is no spelling mistake. )
Please let me know is there any step or trick so that we can skip this?
Solution 1:[1]
Eventually I got the answer. By using selectRules() we can enable or disable any rules.
JLanguageTool jLanguageTool = new JLanguageTool(new AmericanEnglish());
Set<CategoryId> categorySet = new LinkedHashSet<>();
categorySet.add(new CategoryId("CASING"));
categorySet.add(new CategoryId("TYPOGRAPHY"));
Tools.selectRules(jLanguageTool, categorySet, Collections.emptySet(), Collections.emptySet(), Collections.emptySet(), false, false);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yashika Chandra |
