Chatbots

How Phrase Structure helps Machine Learning

This post dives into one of the topics of a previous post “How to Make Machine Learning more effective using Linguistic Analysis“. We referred to the strong points of Machine Learning technology for insight extraction.

We also stated that text analysis is not the area where machine learning shines the most. Here we go into some detail on this last statement.

Statistical techniques are good for analyzing highly complex phenomena that are hard to model because our knowledge of them is scarce. Two examples:

  • the weather or
  • the stock markets.

On language, however, we have accumulated plenty of knowledge for centuries, in the form of grammars and dictionaries typically. We know, for example, that sentences have a structure that determines meaning and machine learning ignores sentence structure.

 

Most (if not all) commercial solutions for text analysis based on machine learning technology take a “bag of words” approach.

Simply put, this means that all words in a sentence (or paragraph or document) are put in a list or “bag”, where the relationships between words are lost (*).

The immediate consequence is that in a sentence like “Google acquired ACME” we lose the information on who’s the acquirer and who’s acquired, because exploiting the knowledge embedded in the sentence structure becomes impossible.

Other strategies like stemming lead to “semantically” relating words that are not related like “good” and “goods”, or “new” and “news”. These issues get worse in multilingual scenarios, where language morphology can be more complex.

Ignoring the structure of a sentence can lead to various types of analysis problems. The most common one is incorrectly assigning similarity to two unrelated phrases such as “Social Security in the Media” and “Security in Social Media” just because they use the same words (although with a different structure).

Besides, this approach has stronger effects for certain types of “special” words like “not” or “if”. In a sentence like “I would recommend this phone if the screen was bigger”, we don’t have a recommendation for the phone, but this could be the output of many text analysis tools, given that we have the words “recommendation” and “phone”, and given that the connection between “if” and “recommend” is not detected.

One typical example in everyday business is the detection of topic in sentiment analysis: in a sentence like “I did enjoy my new car in Madrid”, it’s very helpful for insight extraction to understand that the positive sentiment is about the new car, and not about Madrid. Using machine learning this task becomes impossible in practice.

(*) Some solutions integrate statistical and linguistic knowledge, like the Stanford parser, covered in this post in our blog.

 

Did you like this post? Remember to leave your comments and share!

You could be interested in our Methodology where you could find the process we do setting up and training a bot.

admin

Recent Posts

Deploying Successful GenAI-based Chatbots with less Data and more Peace of Mind.

Customizing Large Language Models in 2 steps via fine-tuning is a very efficient way to…

5 months ago

Any Solutions to the Endless Data Needs of GenAI?

Discover the advantages of using symbolic approaches over traditional data generation techniques in GenAI. Learn…

6 months ago

From General-Purpose LLMs to Verticalized Enterprise Models

In the blog "General Purpose Models vs. Verticalized Enterprise GenAI," the focus is on the…

7 months ago

Case Study: Finequities & Bitext Copilot – Redefining the New User Journey in Social Finance

Bitext introduced the Copilot, a natural language interface that replaces static forms with a conversational,…

9 months ago

Automating Online Sales with Proactive Copilots

Automating Online Sales with a New Breed of Copilots. The next generation of GenAI Copilots…

10 months ago

Taming the GPT Beast for Customer Service

GPT and other generative models tend to provide disparate answers for the same question. Having…

1 year ago