Back to LanguageTool Homepage - Privacy - Imprint

Match word when it is not at the beginning of a sentence


(Michael) #1

Me again :wink:

I tried to match a word when it is not at the beginning of a sentence, but I did not succeed.
I tried most of the combinations of negate_Pos, postag and exception I could think about. E.g.



Blob

What I want to get is: Match "Blob" when it is not at the beginning of a sentence. Best I got was: Match Blob at the beginning of a sentence.
What's my fault?
Testsentence:
The Blob is a film. Blob is a great word.


(Daniel Naber) #2

This seems to work:

<pattern>
       <token negate_pos="yes" postag="SENT_START"/>
       <token>Blob</token>
</pattern>

In general, I'd suggest you subscribe to the mailing list at https://lists.sourceforge.net/lists/listinfo/languagetool-devel and ask questions there, there are more developers around than here in the forum.