Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Menilai teks bahasa alami dan membuat kolom yang berisi probabilitas bahwa sentimen dalam teks positif.
Penggunaan
getSentiment(vars, ...)
Argumen
vars
Vektor karakter atau daftar nama variabel untuk diubah. Jika dinamai, nama mewakili nama variabel baru yang akan dibuat.
...
Argumen tambahan dikirim ke mesin komputasi.
Detail
Transformasi getSentiment mengembalikan probabilitas bahwa sentimen teks alami positif. Saat ini mendukung
hanya bahasa Inggris.
Nilai
Objek maml yang menentukan transformasi.
Penulis
Microsoft Corporation Microsoft Technical Support
Lihat juga
rxFastTrees, rxFastForest, rxNeuralNet, rxOneClassSvm, rxLogisticRegression, rxFastLinear.
Contoh
# 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