小编Ioi*_*oio的帖子

R中西里尔文的情感分析

我无法在此页面上发表评论,我在该页面上找到了俄语/西里尔语语言的情绪分析文本分析功能

get_sentiment_rus <- function(char_v, method="custom", lexicon=NULL, path_to_tagger = NULL, cl = NULL, language = "english") {
  language <- tolower(language)
  russ.char.yes <- "[\u0401\u0410-\u044F\u0451]"
  russ.char.no <- "[^\u0401\u0410-\u044F\u0451]"

    if (is.na(pmatch(method, c("syuzhet", "afinn", "bing", "nrc", 
                             "stanford", "custom")))) 
    stop("Invalid Method")
  if (!is.character(char_v)) 
    stop("Data must be a character vector.")
  if (!is.null(cl) && !inherits(cl, "cluster")) 
    stop("Invalid Cluster")
  if (method == "syuzhet") {
    char_v <- gsub("-", "", char_v)
  }
  if (method == "afinn" || method == "bing" || method == "syuzhet") {
    word_l <- strsplit(tolower(char_v), "[^A-Za-z']+") …
Run Code Online (Sandbox Code Playgroud)

nlp r

2
推荐指数
1
解决办法
521
查看次数

标签 统计

nlp ×1

r ×1