Search code examples
nlpgate

What ({!Lookup.minorType == country}) means in JAPE for GATE


While I am going through JAPE(GATE) learning resources, came across below peace of JAPE rule which is eliminating the(bold formatted) text from becoming the annotation.

JAPE Rule: ({!Lookup.minorType == country})

Text: University of Sheffield US

What exactly the meaning of the above statement? My quick interpretation is minorType shouldn't be equal to type country. But if that is true why the below statements are not working in the same way as above?

({Lookup.minorType != country})

({Lookup.minorType == !country})

Any helpful links to understand LHS and RHS rule syntaxes in detailed manner would be appreciated.


Solution

  • Finally, found explanation by myself at the below link.

    https://gate.ac.uk/userguide/sec:jape:negation

    Rule: SurnameNotStartingWithDe  
    (  
     {Surname, !Token.string ==~ "[Dd]e"}  
    ):name  
    -->  
     :name.NotDe = {}
    

    This would match any Surname annotation that does not start at the same place as a Token with the string ‘de’ or ‘De’. Note that this is subtly different from {Surname, Token.string !=~ "[Dd]e"}, as the second form requires a Token annotation to be present, whereas the first form (!Token...) will match if there is no Token annotation at all at this location.

    As per the example in the question, University of Sheffield need to be a Lookup annotation(which is actually not) to make it work in all three different scenarios.