TOPICS
The TOPICS
commands lets you predict the topics of a piece of text given a text column as input.
Only the text column specified will be analysed and for each entry a topic will be associated.
The command will append two columns to the output: topic_id
and topic_name
.
NOTE: TOPICS
currently works only for English. You can use our TRANSLATE
function to convert from 120 different languages into English.
Syntax
TOPICS(<column_name> [, min_topic_size=<min_topic_size>])
column_name
the input column name to run the topic analysis on. This must be a text column.
Options
min_topic_size
can be used to specify columns the minimum size of a topic.
Returns
Appends two new columns to the input data set: topic_id
and topic_name
.
Similar to clustering, topic_id
holds an integer value describing what group the row is associated with.
The topic_name
field holds the name of the group - ie the topic - as a text value.
Examples
Predicts the topics of the text in the column Review Text
.
SELECT * FROM reviews TOPICS("Review Text");