Back to LanguageTool Homepage - Privacy - Imprint

postag_regexp matching multiple strings

(Nina) #1

A token may have multiple postags or chunktags associated with it. Can I use a regexp to match against the list of postag strings separated by spaces in the XML Rules or an array of postag or chunk strings in Java class Rule?

(Daniel Naber) #2

I’m not sure I understand the question… If you want to match a token
with a POS tag NNS or NNPS, you can use this regex:

postag=“NNS|NNPS” postag_regexp=“yes”

But maybe you already knew that…