Text Classification

Text classification analyses the text and identifies categories for the content with a confidence score.

Text classification uses the natural language processing (NLP) service that uses deep learning techniques to find insights from textual data. It returns a category from a set of the predefined categories.

For example, you could analyze a collection of financial documents to Credit and Lending, Insurance, Investing, Banking, and so on. The results are provided in category and subcategory format.

Supported Features

  • Text category

  • Confidence scores

  • Requests support single record and multiple record batches.

Supported Languages for Input Text

  • English

Examples

Input Text Categories and Scores
Red Bull Racing Honda, the four-time Formula-1 World 
Champion team, has chosen Oracle Cloud Infrastructure 
(OCI) as their infrastructure partner.
Sports and Games/Motor Sports 1.0000

The JSON for the first example is:

Sample Request
POST https://<region-url>/20210101/actions/batchDetectLanguageTextClassification
API Request format:
{
  "documents": [
    {
      "key": "doc1",
      "text": "Red Bull Racing Honda, the four-time Formula-1 World Champion team, has chosen 
Oracle Cloud Infrastructure (OCI) as their infrastructure partner."
    }
  ]
}
Response JSON:
{
    "documents": [
        {
            "key": "1",
            "textClassification": [
                {
                    "label": "Sports and Games/Motor Sports",
                    "score": 1
                }
            ],
            "languageCode": "en"
        }
    ],
    "errors": []
}

Supported Categories

Category Domain Sub-Domain
Animals and Plants/Pets Animals and Plants Pets
Arts and Culture/Audio and Music Arts and Culture Audio and Music
Arts and Culture/Performing Arts Arts and Culture Performing Arts
Arts and Culture/Visual Art and Design Arts and Culture Visual Art and Design
Autos and Vehicles/Bicycles and Accessories Autos and Vehicles Bicycles and Accessories
Autos and Vehicles/Boats and Watercraft Autos and Vehicles Boats and Watercraft
Autos and Vehicles/Motor Vehicles Autos and Vehicles Motor Vehicles
Autos and Vehicles/Vehicle Parts and Services Autos and Vehicles Vehicle Parts and Services
Autos and Vehicles/Vehicle Shopping and Renting Autos and Vehicles Vehicle Shopping and Renting
Books and Literature/Children's Literature Books and Literature Children'S Literature
Books and Literature/E-Books Books and Literature E-Books
Books and Literature/Poetry Books and Literature Poetry
Business and Industry/Advertising and Marketing Business and Industry Advertising and Marketing
Business and Industry/Agriculture and Forestry Business and Industry Agriculture and Forestry
Business and Industry/Business Operations Business and Industry Business Operations
Business and Industry/Business Services Business and Industry Business Services
Business and Industry/Construction and Maintenance Business and Industry Construction and Maintenance
Business and Industry/Defence Business and Industry Defence
Business and Industry/Energy and Utilities Business and Industry Energy and Utilities
Business and Industry/Manufacturing Business and Industry Manufacturing
Business and Industry/Metals and Mining Business and Industry Metals and Mining
Business and Industry/Printing and Publishing Business and Industry Printing and Publishing
Business and Industry/Textiles and Nonwovens Business and Industry Textiles and Nonwovens
Business and Industry/Transportation and Logistics Business and Industry Transportation and Logistics
Computer and Electronics/Computer Hardware Computer and Electronics Computer Hardware
Computer and Electronics/Computer Security Computer and Electronics Computer Security
Computer and Electronics/Consumer Electronics Computer and Electronics Consumer Electronics
Computer and Electronics/Electronics and Electrical Computer and Electronics Electronics and Electrical
Computer and Electronics/Enterprise Software Computer and Electronics Enterprise Software
Computer and Electronics/Programming Computer and Electronics Programming
Computer and Electronics/Software Computer and Electronics Software
Education and Occupation/Education Education and Occupation Education
Education and Occupation/Jobs Education and Occupation Jobs
Entertainment/Celebrities and Famous Personalities Entertainment Celebrities and Famous Personalities
Entertainment/Comics and Animation Entertainment Comics and Animation
Entertainment/Events and Listings Entertainment Events and Listings
Entertainment/Film Industry Entertainment Film Industry
Entertainment/Humor Entertainment Humor
Entertainment/Movies Entertainment Movies
Finance/Accounting and Auditing Finance Accounting and Auditing
Finance/Banking Finance Banking
Finance/Credit and Lending Finance Credit and Lending
Finance/Financial Planning and Management Finance Financial Planning and Management
Finance/Grants, Scholarships and Financial Aid Finance Grants, Scholarships and Financial Aid
Finance/Investing Finance Investing
Fitness and Beauty/Fashion and Style Fitness and Beauty Fashion and Style
Fitness and Beauty/Weight Loss Fitness and Beauty Weight Loss
Food and Grocery/Cooking and Recipes Food and Grocery Cooking and Recipes
Food and Grocery/Drinks and Beverages Food and Grocery Drinks and Beverages
Food and Grocery/Food Food and Grocery Food
Food and Grocery/Grocery Retailers Food and Grocery Grocery Retailers
Food and Grocery/Restaurants Food and Grocery Restaurants
Government and Laws/Government Government and Laws Government
Government and Laws/Legal Government and Laws Legal
Government and Laws/Military Government and Laws Military
Government and Laws/Public Safety Government and Laws Public Safety
Groups and Communities/Social Networks Groups and Communities Social Networks
Health and Medical/Aging and Geriatrics Health and Medical Aging and Geriatrics
Health and Medical/Conditions and Disease Health and Medical Conditions and Disease
Health and Medical/Medical Facilities and Services Health and Medical Medical Facilities and Services
Health and Medical/Mental Health Health and Medical Mental Health
Health and Medical/Nursing Health and Medical Nursing
Health and Medical/Nutrition Health and Medical Nutrition
Health and Medical/Oral and Dental Care Health and Medical Oral and Dental Care
Health and Medical/Pharmacy Health and Medical Pharmacy
Health and Medical/Women's Health Health and Medical Women's Health
Hobbies and Leisure Activities/Crafts Hobbies and Leisure Activities Crafts
Hobbies and Leisure Activities/Outdoors Hobbies and Leisure Activities Outdoors
Hobbies and Leisure Activities/Water Activities Hobbies and Leisure Activities Water Activities
Home and Decor/Bed and Bath Home and Decor Bed and Bath
Home and Decor/Gardening and Landscaping Home and Decor Gardening and Landscaping
Home and Decor/Home Furnishings Home and Decor Home Furnishings
Home and Decor/Home Improvement Home and Decor Home Improvement
Home and Decor/Kitchen and Dining Home and Decor Kitchen and Dining
Home and Decor/Yard and Patio Home and Decor Yard and Patio
Hotel and Travel/Hotels and Accommodations Hotel and Travel Hotels and Accommodations
Hotel and Travel/Personal Travel Hotel and Travel Personal Travel
Internet and Communications/Communications Equipment Internet and Communications Communications Equipment
Internet and Communications/Email and Messaging Internet and Communications Email and Messaging
Internet and Communications/Service Providers Internet and Communications Service Providers
Internet and Communications/Web Services Internet and Communications Web Services
Real Estate and Properties/Real Estate Listings Real Estate and Properties Real Estate Listings
Retailing and Shopping/Consumer Resources Retailing and Shopping Consumer Resources
Retailing and Shopping/Department Stores Retailing and Shopping Department Stores
Retailing and Shopping/Gifts and Special Event Items Retailing and Shopping Gifts and Special Event Items
Science and Technology/Biology Science and Technology Biology
Science and Technology/Chemistry Science and Technology Chemistry
Science and Technology/Computer Science Science and Technology Computer Science
Science and Technology/Earth Sciences Science and Technology Earth Sciences
Science and Technology/Ecology and Environment Science and Technology Ecology and Environment
Science and Technology/Engineering Science and Technology Engineering
Science and Technology/Mathematics and Statistics Science and Technology Mathematics and Statistics
Science and Technology/Physics Science and Technology Physics
Science and Technology/Social Science Science and Technology Social Science
Society and State/Family and Relationships Society and State Family and Relationships
Society and State/Kids and Teens Society and State Kids and Teens
Society and State/Religion and Belief Society and State Religion and Belief
Society and State/Social Issues and Advocacy Society and State Social Issues and Advocacy
Sports and Games/Animal Sports Sports and Games Animal Sports
Sports and Games/Board Games Sports and Games Board Games
Sports and Games/Card Games Sports and Games Card Games
Sports and Games/Combat Sports Sports and Games Combat Sports
Sports and Games/Computer and Video Games Sports and Games Computer and Video Games
Sports and Games/Gambling Sports and Games Gambling
Sports and Games/Individual Sports Sports and Games Individual Sports
Sports and Games/International Sports Competitions Sports and Games International Sports Competitions
Sports and Games/Motor Sports Sports and Games Motor Sports
Sports and Games/Table Games Sports and Games Table Games
Sports and Games/Team Sports Sports and Games Team Sports
Sports and Games/Water Sports Sports and Games Water Sports
Sports and Games/Winter Sports Sports and Games Winter Sports

Limitations

  • If the text is about more than one category, the major category of the text is identified and could differ from human interpretation of the text.