Text Analysis
Text analysis is the process of deriving meaningful insights from text data by using natural language processing (NLP) techniques

Translation + Sentiment of Customer Feedback
This example uses a customer
table to translate reviews from Brazilian Portuguese into English and then extract the sentiment of the translated reviews.
- The first operation is a SELECT statement that is being used to define a common table expression (CTE) called "translated_reviews". The CTE is created using a WITH clause, which is followed by a SELECT statement that retrieves two columns: "customer_feedback" and "prediction" which is renamed as "translated_feedback". The TRANSLATE command takes the "customer_feedback" column and translates them from Brazilian Portuguese into English.
- The second operation is a SELECT statement that uses the "translated_reviews" CTE as input. The SENTIMENT command is applied to the "translated_feedback" column, to derive the sentiment of the translated text.
The final result shows the original text, the translated text in English, and the sentiment of that text.

Understanding Sentiment
This example shows how you can easily understand the drivers of sentiment.
It's super simple - all you need to do is use a PREDICT
function with EXPLAIN
! Infer then uses Explainable AI to examine your sentiment prediction model, and figure out what the drivers of sentiment are.
The final result shows the importance of each column (features) in your sentiment prediction model. Now you can use this information to figure out what kind of people are associated with positive, negative, or neutral sentiment.

Extracting Topics
This example shows how you can use your translated reviews to find common themes, or topics, in those reviews, using the TOPICS command.
The final result gives you the original translated view, now with a topic_name, topic_id, and a 'segment'. Segments are smaller parts of the original text, which are more specific to the topic itself. This is especially useful for longer piece of texts, with multiple topics.