Back to Top

 

Relation Named Entities

Relation Subject / Object Entity Extraction

AlchemyAPI provides the ability to identify named entities within subjects and objects of identified Subject-Action-Object relations, supporting advanced entity recognition capabilities including disambiguation, coreference resolution, and linked data output.

What is Entity Extraction?

Named entity extraction is the process of identifying "things" such as persons, companies, locations, organizations, and products within text.

How Do I Use It?

Subject / object named entity output is disabled by default. Enabling this feature for an API call results in counting of one additional transaction against your daily API limit. To enable Subject-Action-Object named entity output, you may use the following HTTP parameter with your API calls:

    entities=1

NOTE: This functionality is currently available for English-language content only. Support for outputting relation+entity data in other languages is currently in development.

What Does AlchemyAPI Subject / Object Named Entity Output Look Like?

When this functionality is enabled, AlchemyAPI searches for named entities within every detected relation subject and object within the analyzed text.

The following is an example XML-formatted response (for "A determined Bill Clinton traveled to Chicago"):

<subject>
    <text>A determined Bill Clinton</text>
    <entity>
        <type>Person</type>
        <text>Bill Clinton</text>
    </entity>
</subject>
<action>
    <text>traveled to</text>
</action>
<object>
    <text>Chicago</text>
    <entity>
        <type>City</type>
        <text>Chicago</text>
    </entity>
</object>

In the above example, AlchemyAPI identifies "Bill Clinton" as a Person, and "Chicago" as a city.

NOTE: AlchemyAPI currently returns only the first identified named entity within a relation subject or object.

Can I Retrieve *Only* Relations Containing Named Entities?

Yes, AlchemyAPI supports extracting only relations which contain a named entity in either the subject or object. To enable this functionality, use the following HTTP parameter with your API calls:

    requireEntities=1

NOTE: When this parameter is not issued, all relations will be extracted, regardless of whether they contain a named entity.

Is Disambiguation Supported?

Yes, AlchemyAPI will attempt disambiguation of named entities found within a relation subject or object. This functionality is enabled by default when entity relations output is enabled. To disable this functionality, use the following HTTP parameter with your API calls:

    disambiguate=0

The following is an example XML-formatted response containing disambiguation data (for "A determined Bill Clinton traveled to a city"):

<subject>
    <text>A determined Bill Clinton</text>
    <entity>
        <type>Person</type>
        <text>Bill Clinton</text>
        <disambiguated>
            <name>Bill Clinton</name>
            <subType>Politician</subType>
            <subType>USPresident</subType>
            <subType>OfficeHolder</subType>
            <website>http://www.clintonlibrary.gov/</website>
            <dbpedia>http://dbpedia.org/resource/Bill_Clinton</dbpedia>
            <freebase>http://rdf.freebase.com/ns/guid.9202a8c04000641f80000000000094f3</freebase>
        </disambiguated>
    </entity>
</subject>
<action>
    <text>traveled to</text>
</action>
<object>
    <text>a city</text>
</object>

In the above example, AlchemyAPI disambiguates "Bill Clinton" as a USPresident, Policitican, and OfficeHolder. Linkages are provided to the website, dbpedia page, freebase page, and other resources for this entity.