Back to LanguageTool Homepage - Privacy - Imprint

Weird tagging error?

(Alan) #1


I’m getting a weird response when I try one of my own rules. Here’s the rule, and in the image the result. The difference in the two phrases seems to be the {!} which tails the NP chunk in the first sentence. I’ve searched the site but haven’t found out what it means.


        <rule id="NON-USE_OF_PRESENT_PERFECT_WITH_SINCE" name="present tense + for/since">
                <token postag="VBP|VBZ|VBD" postag_regexp="yes"><exception>got</exception><exception postag="VBN"/></token>
                <token postag="RB|RBR|JJ|NNS|NNP|NNPS|NN:U|NN:UN|PRP|VBN" postag_regexp="yes"></token>
                <token postag="PRP"></token>
                <token regexp="yes">was|were</token>
            <message>When we talk how long something HAS LASTED, we use the present perfect.</message>
            <suggestion>have/has <match no="1" postag="VBN"/> \2 since</suggestion>

(Daniel Naber) #2

Hi Alan, {!} means the token was immunized by a disambiguation rule with <disambig action="immunize"/>.

(Alan) #3

OK, thanks… I’ll have to read up on that, but obviously that immunization is making a difference when it comes to applying the rule.

How can it be fixed?

(Marcin Miłkowski) #4

Well, it cannot be fixed without changing the disambiguation rules. There were some immunization rules used to make CD_NN rule to work correctly. I went ahead and made some changes right now. Your rule should now match :slight_smile:

(Alan) #5

Thanks, yes I found it and added an exception which solves this particular problem… I assume it won’t affect any other rules negatively.

    <rule name="Immunize age" id="X_WAS_CD">
        <token regexp="yes">s?he|you|I|we|they|it</token>
        <token inflected="yes">be</token>
        <token postag="CD"/>
      <disambig action="immunize"/>

(Marcin Miłkowski) #6

Actually, you don’t need this any more. It’s removed from the disambiguation rules in the repository.

(Alan) #7

I assume you mean for when I upgrade. I’m not using the latest version of LT yet.

Thanks very much for your help

(Marcin Miłkowski) #8

I mean in the github repository (or in the nightly build).