Headline Market Analysis

Given a news headline, identify if the category of the article is technology, economy, or health

Classify Data
Topic Classification

Examples

LABEL

TEXT

Technology

New Era Begins at Warner Bros. Tinged with Nostalgia

Technology

As Gas Prices Went Up, So Did the Hunt for Electric Vehicles

Technology

Facial Recognition Goes to War

Technology

US Says It Secretly Removed Malware Worldwide

Technology

The Old-Timers Are Chasing Netflix

Economy

Few Cars, Lots of Customers: Why Autos Are an Inflation Risk

Economy

Supply Chains Widely Tainted by Forced Labour in China

Economy

The US Economy is Booming. Why are Economists Worrying About a Recession?

Economy

Industries hit hard by the pandemic continued their rebound

Economy

Energy prices in Europe soar 45 percent as inflation hits another record

Health

New Drug Slashed Deaths Among Patients With Severe Covid, Maker Claims

Health

Is 30 minutes of Exercise a Day Enough?

Health

With a $2.1 Million Cure Their Only Hope, Parents Plead for Help Online

Health

The FDA suspends use of a Glaxo antibody drug in the US as an Omnicron subvariant spreads

Health

What to know about the Bird Flu Outbreak

Request

How Robots Can Assist Students with Disabilities

Response

Technology

48%

Health

44%

Economy

8%

API Request
import cohere
from cohere.classify import Example
co = cohere.Client('{apiKey}')
response = co.classify(
model='large',
inputs=["Biden Administration will Start Vaccinating Migrants at Border", "How Robots Can Assist Students with Disabilities"],
examples=[Example("New Era Begins at Warner Bros. Tinged with Nostalgia", "Technology"), Example("As Gas Prices Went Up, So Did the Hunt for Electric Vehicles", "Technology"), Example("Facial Recognition Goes to War", "Technology"), Example("US Says It Secretly Removed Malware Worldwide", "Technology"), Example("The Old-Timers Are Chasing Netflix", "Technology"), Example("Few Cars, Lots of Customers: Why Autos Are an Inflation Risk", "Economy"), Example("Supply Chains Widely Tainted by Forced Labour in China", "Economy"), Example("The US Economy is Booming. Why are Economists Worrying About a Recession?", "Economy"), Example("Industries hit hard by the pandemic continued their rebound", "Economy"), Example("Energy prices in Europe soar 45 percent as inflation hits another record", "Economy"), Example("New Drug Slashed Deaths Among Patients With Severe Covid, Maker Claims", "Health"), Example("Is 30 minutes of Exercise a Day Enough?", "Health"), Example("With a $2.1 Million Cure Their Only Hope, Parents Plead for Help Online", "Health"), Example("The FDA suspends use of a Glaxo antibody drug in the US as an Omnicron subvariant spreads", "Health"), Example("What to know about the Bird Flu Outbreak", "Health")])
print('The confidence levels of the labels are: {}'.format(response.classifications))