nlpgatenamed-entity-recognition

JAPE check for numeric only input


I have the below JAPE file for ANNIE in which I am trying to ensure that establishments names which contain only numeric characters do not get annotated.

I have tried many variations of the below but do not seem to be able to get it to work.

Phase:Establishment
Input: Lookup Token
Options: control = appelt

Rule: EstablishmentNonNumeric
Priority: 100
//do not tag establishment names which contain only numbers as this is just weird
(
({Lookup.majorType == "establishment", Lookup.kind == number})
): temp
-->
{ }

Rule: Establishment
(
{Lookup.majorType == "establishment"}
): temp
-->
:temp.Establishment ={rule= "EstablishmentRule" } 

I have a feeling it may be to do with the control setting but I am not really sure.

Many thanks!


Solution

  • My guess is that you meant:

    Token.kind == number
    

    instead of:

    Lookup.kind == number