getSentiment: 기계 학습 감정 분석기 변환

자연어 텍스트의 점수를 매기고, 텍스트의 감정 점수가 양수인 확률을 포함하는 열을 만듭니다.

사용

  getSentiment(vars, ...)

인수

vars

변환할 문자 벡터 또는 변수 이름 목록입니다. 명명된 경우 이름은 만들 새 변수의 이름을 나타냅니다.

...

컴퓨팅 엔진으로 전송된 추가 인수입니다.

세부 정보

getSentiment 변환은 자연 텍스트의 감정이 긍정적일 확률을 반환합니다. 현재는 영어만
지원합니다.

값

변환을 정의하는 maml 개체입니다.

작성자

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