Author: Xinzhuo Huang
Version: 0.1.0
An R package for sentence-level and word-level sentiment analysis which support vectorization, multithreading and is robust to errors.
remotes::install_github("xinzhuohkust/sentimentRPy")
sentimentRPy::get_sentimentR(
text = c("I am happy", "I am sad"),
method = "word"
)
sentence-level will take the linking words of contrast and negation into account.
sentimentRPy::get_sentimentR(
text = "I am not happy, but I am also not unhappy.",
method = "sentence"
)
multithreading model using all availabel CPU cores.
sentimentRPy::get_sentimentR(
text = a large corpus,
method = "sentence", # or word
multisession = TRUE
)
asent <- sentimentRPy::asent_setup(python = "C:\\Users\\xhuangcb\\anaconda3\\envs\\pytorch_gpu\\python.exe")
sentimentRPy::get_sentimentPy("I am not happy, but I am also not unhappy.")