addComponent

Adds a new component to the match. For example, if your Eduction task returns an e-mail address as a match, you can use addComponent to extract the text after the @ symbol and add it as a DOMAIN component for the match.

You can also use addComponent to add metadata from other sources. For example, if you have extracted a place name, you can add components called “LATITUDE” and “LONGITUDE”, and populate them with data from a different source, regardless of the fact that they were not components of the original text.

Syntax

edkmatch:addComponent(name, offset, offsetLength)

Arguments

Argument Description
name

The name of the new component (for example, TOPIC, or SENTIMENT)

offset

The position of the text in the match to use as the new component (in bytes).

offsetLength

The position of the text in the match to use as the new component (in characters).

Note: f you are unsure of the correct offset or offsetLength, you can specify offset=0 or offsetLength=0.

Returns

The new empty component object.


_HP_HTML5_bannerTitle.htm