KseniaK KseniaK - 6 months ago 11
Java Question

GATE how to annotate each verb except those in the list

I have this task: I have .lst file in GATE with list of verbs. The have annotation Inner_predicates. And I need to annotate other verbs as Outer_predicates. Can you help me to write this rule?

I tried this:

Phase: Outer_Pred
Input: Morph Inner_Pred
Options: control = appelt

Rule: Outer_Pred

(
({Morph.pos == verb}, Morph.baseForm !=Inner_Pred)
):tag
-->
:tag.Outer_Pred = {rule = "Outer_Pred"}


But it is of no use. How can I find a verb, check whether it already has an annotation Inner_Pred and if not, annotate this verb as Outer_Pred?
In inner_pred.lst I have list of verbs in base form.

Thanks in advance. And also it would be great, if you could tell me where I can look this information by myself. I found only GATE Jape Manual but it is quite short and doesn't provide many answers.

Answer

If you have a list of verbs in their base form, you should try a flexible gazetteer. It will create "Lookup" annotations where it matches (not only on verbs).

Then to match each verb that is not on the list:

Phase: Outer_Pred
Input: Morph Lookup
Options: control = appelt

Rule: Outer_Pred (
  {Morph.pos == "verb", !Lookup.majorType == "yourInnerPredType"}
):tag
-->
:tag.Outer_Pred = {rule = "Outer_Pred"}

This will match every "verb" which does not start on the same offset as a Lookup with major type "yourInnerPredType".

Also, make sure you have the Morph annotations with the right pos feature.

Comments