Back to LanguageTool Homepage - Privacy - Imprint

How to match several tokens which co-occur at least one time?

(Rincy) #1

I want to match sentences like this :

JJ,JJ,…JJ and JJ.

In this sentence, JJ and comma appear many times.
I know I should write JJ and “,” in two tokens respectively like this :



But in this way, I can match only 3 adjectives. So how to match “JJ,” occur at least one time?
Can I use the regex or other tags?


(Daniel Naber) #2

I don’t think the rule syntax supports that, you’ll need to write a simple Java rule by extending the “Rule” class and implementing “match(AnalyzedSentence sentence)”.


(Rincy) #3

oh,thank you .