Back to LanguageTool Homepage - Privacy - Imprint

Matching tag, still not working

(Ruud Baars) #1

When I have a token:
<token inflected="yes">deur</token>
deur is the root word, with tag NN1d
The other forms are deuren/NN2, deurtje/NN1r and deurtjes/NN2r
When i want to suggest the corresponding alternative of the word raam
raam/NN1h, ramen/NN2, raampje/NN1r, raampjes/NN2r
I cannot find the right way to spedify the replacement in a way it should find
NN1h for NN1d (and keep the others identical)

Any suggestions (apart from doing every form in a separate rule)?

[de] Improvement of POS analysis
(Ruud Baars) #2

I still cannot find a solution for this. So there are the options to have a separate rule, or make 'de' and 'het' separate tags/flags on the word. As far as I understand the text, always the exact tag of 'deur' is going to be matched, which is the NN1d; there is no 'replace' that makes it possible to change that to NN1h for the match, without problems for the other tags of the word to be found.

Or is there?

(Ruud Baars) #3

Solved it myself. <match no="1" postag="(NN1d)|(NN2)|(NN1r)|(NN2r)" postag_replace="NN1h|$2|$3|$4"