Please help.
I have some text " 99285/25 EMERGENCY SE 850.0 650.00 04/05/12
INTERPRET 813.44 $36.00 04/05/12 CARLOS "
I need to tag 650.00 also as Money, Gate automatically picks up $36.00 as Money tag. How do I specify it?
Imports: { import static gate.Utils.*; }
Phase: Number
Input: Token Number
Options: control = all
Macro: AMOUNT_NUMBER
({Token.kind == number}
(({Token.string == ","}|
{Token.string == "."}
)
{Token.kind == number}
)
Rule: MoneyCurrencyUnit
(
(AMOUNT_NUMBER)
({Number.majorType == currency_unit})
)
:number -->
:number {
{
{kind = "number", rule = "MoneyCurrencyUnit"}
}
catch(InvalidOffsetException e) {
// not possible
throw new LuckyException("Invalid offset from annotation");
}
}
I'm new using JAPE Grammar please help.
Thank you.