Introduction to Machine Learning for SEO
- What is entity extraction and semantic analysis?
- Practical: Semantic Analysis of Customer reviews
- Comparative Analysis of NLP APIs versus generative AI on entity extraction
NLP (Concepts & Pipeline)
In shortThe part of NLP concerned with meaning: what words and sentences mean and how they relate, covering tasks like entity analysis, sentiment and topics.
Semantic analysis is the part of natural language processing concerned with meaning. It works out what words, phrases and sentences mean, which things are being talked about, and how they relate to each other. Entity extraction, sentiment analysis, text classification and topic modelling all sit under this heading.
MLforSEO explains semantic analysis with an analogy from compiler design, where human language passes through a series of phases on its way to machine understanding:
You rarely build this yourself. Pre-trained APIs such as the Google Cloud Natural Language API, IBM Watson NLU and Amazon Comprehend bundle the semantic tasks together: entities with types and salience, document and entity sentiment, classification and moderation. Large language models can perform the same tasks from a prompt, with less consistent output.
Take the review “The staff in the Leeds store were lovely, but the prices went up again.” Semantic analysis finds the entities staff, Leeds store and prices. Entity sentiment is positive for staff and negative for prices, and the overall document sentiment is mixed. A plain positive-or-negative label would hide the fact that the store’s service is a strength and pricing is the problem.