Back to Top

 

Sentiment: Entity Extraction

Entity-level Sentiment Analysis Support

AlchemyAPI provides the ability to extract entity-level sentiment (positive/negative statements), in addition to performing document-level, user-targeted sentiment, directional sentiment, and keyword-level sentiment analysis.

What is Sentiment Analysis?

Sentiment analysis is the process of identifying positive or negative statements, feelings, and opinions within text.

How Do I Use It?

Entity-level sentiment output is disabled by default. Enabling this feature results in counting of one additional transaction against your daily API limit. To enable entity-level sentiment analysis, you may utilize the following HTTP parameter with your API calls:

    sentiment=1

NOTE: Sentiment analysis is currently available for English and German-language content only. Support for outputting sentiment data for entities in other languages is currently in development.

What Does AlchemyAPI Entity-level Sentiment Look Like?

When entity-level sentiment analysis is enabled, sentiment data is included for every detected entity within AlchemyAPI responses.

The following is an example XML-formatted response (for "Moammar Gadhafi"):


    <entity>
        <type>Person</type>
        <relevance>0.813554</relevance>
        <count>13</count>
        <text>Moammar Gadhafi</text>
        <sentiment>
            <type>negative</type>
            <score>-0.120216</score>
        </sentiment>
    </entity>

NOTE: Entity-level sentiment analysis is supported within all AlchemyAPI response formats, including XML, JSON, and RDF.