Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Scores natural language text and creates a column that contains probabilities that the sentiments in the text are positive.
getSentiment(vars, ...)
A character vector or list of variable names to transform. If named, the names represent the names of new variables to be created.
Additional arguments sent to compute engine.
The getSentiment
transform returns the probability
that the sentiment of a natural text is positive. Currently supports
only the English language.
A maml
object defining the transform.
Microsoft Corporation Microsoft Technical Support
rxFastTrees, rxFastForest, rxNeuralNet, rxOneClassSvm, rxLogisticRegression, rxFastLinear.
# Create the data
CustomerReviews <- data.frame(Review = c(
"I really did not like the taste of it",
"It was surprisingly quite good!",
"I will never ever ever go to that place again!!"),
stringsAsFactors = FALSE)
# Get the sentiment scores
sentimentScores <- rxFeaturize(data = CustomerReviews,
mlTransforms = getSentiment(vars = list(SentimentScore = "Review")))
# Let's translate the score to something more meaningful
sentimentScores$PredictedRating <- ifelse(sentimentScores$SentimentScore > 0.6,
"AWESOMENESS", "BLAH")
# Let's look at the results
sentimentScores
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today