Introduction to Machine Learning for SEO
- Comparative Analysis of NLP APIs versus generative AI on entity extraction
- What is entity extraction and semantic analysis?
APIs
In shortAWS's pre-trained NLP API that extracts entities, key phrases, sentiment, language and personal data from text, with a confidence score for each result.
Amazon Comprehend is the managed natural language processing service from Amazon Web Services (AWS). You send it text and it returns structured data: the entities mentioned, key phrases, sentiment, the dominant language, personal information and syntax. On MLforSEO it is one of the three purpose-built NLP APIs, alongside the Google Natural Language API and IBM Watson NLU, that we compare against generative chatbots for text analysis.
Comprehend bundles several pre-trained models behind one service, and each task is its own API operation. Entity detection labels names with a type from a fixed list (such as PERSON, ORGANIZATION, LOCATION, COMMERCIAL_ITEM, EVENT, DATE, QUANTITY and TITLE) and gives every entity a confidence score and its character position in the text. Separate operations handle key phrases, document-level sentiment, targeted (entity-level) sentiment, language detection and PII (personally identifiable information) detection. You can call it from the AWS console demo for a single text, from the SDKs for a script, or as asynchronous batch jobs for large volumes. If the standard entity types do not fit your domain, you can train custom classifiers and custom entity recognisers on your own labelled data.
One design choice matters for SEOs. Concepts that Google’s API labels as entities of type OTHER (machine learning, marketing, big tech) are treated by Comprehend as key phrases, a separate module. So a fair comparison runs both modules.
In the MLforSEO benchmark of NLP APIs and generative AI, the same 221-word bio was run through each tool. Comprehend returned 21 entity rows (15 unique) across five types and found 12 of the 13 core named entities. It missed “Women in Marketing – Bulgaria” as an organisation, returning “Bulgaria” as a location instead, and typed MLforSEO as a TITLE, a type Amazon reserves for creative works. Most confidence scores were above 0.9. Running the key-phrase module on the same text added more than 50 further phrases, which explains much of the gap in raw counts against Google.