JAPE 检查仅数字输入

JAPE check for numeric only input

我有以下 ANNIE 的 JAPE 文件,我在其中试图确保只包含数字字符的企业名称不会被注释。

我已经尝试了下面的许多变体,但似乎无法让它工作。

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" } 

我感觉这可能与控制设置有关,但我不太确定。

非常感谢!

我猜你的意思是:

Token.kind == number

而不是:

Lookup.kind == number