Powered by Zoomin Software. For more details please contactZoomin

Semaphore Classification Server Rulebase Reference

EXTRACT_GROUP_KEY

  • Last Updated: May 13, 2026
  • 3 minute read
    • Semaphore
    • Documentation

When the EXTRACT_GROUP attribute is used then this attribute may be used to set a key value for the group (if the specified key is not part of the group then the groupkey will remain blank).

The advantage of setting a key value is that extraction groups may be merged if their key values are identical (but not blank) which allows information discovered in seperate parts of the document to be used as a single group.

If, for example, you were extracting information about people from documents then you might be able to find the addresses of several people in one part of the document and their respective dates of birth in some other part. By providing the name of the person as the groupkey you would be able to merge the information into the correct grouping.

NB in general this merging is very hard to do accurately and this mechanism of a textual match by a key is not particularly sophisticated - for more sophisticated uses you would typically extract the information into separate groups and add to a RDF triple store. Then statistical assertions could be used to link the appropriate triples.

Applies to

Optional for any rule which has EXTRACT_GROUP attribute

Values

  • “XXXX” - XXXX is the extraction name of some extracted evidence which is to be grouped by this rule and the value of this is used as the value for the group (ie is similar to a key value used for a join between tables in SQL)

Other attributes having special meaning for any rule with this attribute

Example

The following document:

Jean-Claude Trichet announced today a rise of 1/2 point in interest rates.
In a separate intervention the governor of the European Central Bank announced that the
institution will keep a firm handle on inflation.

Evaluated against the following rulebase fragment:

<sentence extract="1" extract_group="group" extract_group_key="person" >
    <link label="_:People_of_interest" extract_tags="person"  />
    <text data="{V:announce}" stem="1" pos="1" extract_name="action" />
    <link label="_:Noun_group" extract_name="noun_group" />
</sentence>
<any label="_:People_of_interest" >
   <text data="Jean-Claude Trichet" tag="http://www.example.com/people/Jean-Claude_Trichet"/>
   <text data="governor of the European Central Bank" tag="http://www.example.com/people/Jean-Claude_Trichet"/>
</any>
<union label="_:Noun_group" >
    <text data="{N} {N}" />
    <sequence>
        <text data="{CARD}" not="1" />
        <text data="{N}" />
        <text data="{PREP}" />
        <text data="{N}" />
    </sequence>
</union>

Will return:

....
<META name="group" value="http://www.example.com/people/Jean-Claude_Trichet" score="1.00">
<META name="action" value="announced" score="1.00"/>
<META name="noun_group" value="handle on inflation" score="1.00"/>
<META name="noun_group" value="interest rates" score="1.00"/>
<META name="person" value="http://www.example.com/people/Jean-Claude_Trichet" score="1.00"/>
</META>....

Using the group_key here means that the tag extracted as “name” has been used to join the 2 groups http://www.example.com/people/Jean-Claude_Trichet)).

If EXTRACT_GROUP_KEY is not used or if the tags differed then 2 groups would be extracted

<sentence extract="1" extract_group="group" >
    <link label="_:People_of_interest" extract_tags="person"  />
    <text data="{V:announce}" stem="1" pos="1" extract_name="action" />
    <link label="_:Noun_group" extract_name="noun_group" />
</sentence>

<any label="_:People_of_interest" >
   <text data="Jean-Claude Trichet" tag="http://www.example.com/people/Jean-Claude_Trichet"/>
   <text data="governor of the European Central Bank" tag="http://www.example.com/people/Jean-Claude_Trichet"/>
</any>
<union label="_:Noun_group" >
    <text data="{N} {N}" />
    <sequence>
        <text data="{CARD}" not="1" />
        <text data="{N}" />
        <text data="{PREP}" />
        <text data="{N}" />
    </sequence>
</union>

....
<META name="group" value="" score="1.00">
<META name="action" value="announced" score="1.00"/>
<META name="noun_group" value="interest rates" score="1.00"/>
<META name="person" value="http://www.example.com/people/Jean-Claude_Trichet" score="1.00"/>
</META>
<META name="group" value="" score="1.00">
<META name="action" value="announced" score="1.00"/>
<META name="noun_group" value="handle on inflation" score="1.00"/>
<META name="person" value="http://www.example.com/people/Jean-Claude_Trichet" score="1.00"/>
</META>
....

<sentence extract="1" extract_group="group" extract_group_key="person" >
    <link label="_:People_of_interest" extract_tags="person"  />
    <text data="{V:announce}" stem="1" pos="1" extract_name="action" />
    <link label="_:Noun_group" extract_name="noun_group" />
</sentence>

<any label="_:People_of_interest" >
   <text data="Jean-Claude Trichet" tag="http://www.example.com/people/Jean-Claude_Trichet"/>
   <text data="governor of the European Central Bank" tag="http://www.example.com/people/Christine_Lagarde"/>
</any>
<union label="_:Noun_group" >
    <text data="{N} {N}" />
    <sequence>
        <text data="{CARD}" not="1" />
        <text data="{N}" />
        <text data="{PREP}" />
        <text data="{N}" />
    </sequence>
</union>

Giving

...
<META name="group" value="http://www.example.com/people/Christine_Lagarde" score="1.00">
<META name="action" value="announced" score="1.00"/>
<META name="noun_group" value="handle on inflation" score="1.00"/>
<META name="person" value="http://www.example.com/people/Christine_Lagarde" score="1.00"/>
</META>
<META name="group" value="http://www.example.com/people/Jean-Claude_Trichet" score="1.00">
<META name="action" value="announced" score="1.00"/>
<META name="noun_group" value="interest rates" score="1.00"/>
<META name="person" value="http://www.example.com/people/Jean-Claude_Trichet" score="1.00"/>
</META>
...

See Also

TitleResults for “How to create a CRG?”Also Available inAlert