Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in sentiment stanford_by() #12

Open
sadettindemirel opened this issue Nov 4, 2021 · 0 comments
Open

error in sentiment stanford_by() #12

sadettindemirel opened this issue Nov 4, 2021 · 0 comments

Comments

@sadettindemirel
Copy link

I have an error when using sentiment stanford_by () on rows of tweets. The thing is that when I tried the same code on 1000 rows of tweets, it worked flawlessly but later tried on 9K tweets, I got the error below. I did not clean the text before running the command and the object I work is data frame format. What am I doing wrong here?

error

Error in `[.data.table`(sent_dat[, list(sentences = unlist(sentences)), : 
Supplied 19238 items to be assigned to 19239 items of column 'sentiment'.
 If you wish to 'recycle' the RHS please use rep() to make this intent clear to readers of your code.
checking java

checking if Java is installed.

java version "15.0.2" 2021-01-19
Java(TM) SE Runtime Environment (build 15.0.2+7-27)
Java HotSpot(TM) 64-Bit Server VM (build 15.0.2+7-27, mixed mode, sharing)

checking minimal Java version...

Java appears to be installed and at least of the minimal version.

checking if coreNLP is installed...

Stanford coreNLP appears to be installed.

...Let the NLP tagging begin!
session info

R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252 
[2] LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] dplyr_1.0.7      sentimentr_2.7.1 stansent_0.2.0   pacman_0.5.1    

loaded via a namespace (and not attached):
 [1] pillar_1.6.3       compiler_4.1.1     tools_4.1.1        digest_0.6.28     
 [5] evaluate_0.14      lifecycle_1.0.1    tibble_3.1.5       pkgconfig_2.0.3   
 [9] rlang_0.4.11       rstudioapi_0.13    DBI_1.1.1          cli_3.0.1         
[13] yaml_2.2.1         xfun_0.26          fastmap_1.1.0      coreNLPsetup_0.0.1
[17] knitr_1.36         generics_0.1.0     vctrs_0.3.8        syuzhet_1.0.6     
[21] tidyselect_1.1.1   glue_1.4.2         data.table_1.14.2  R6_2.5.1          
[25] qdapRegex_0.7.2    fansi_0.5.0        rmarkdown_2.11     lexicon_1.2.1     
[29] textclean_0.9.3    purrr_0.3.4        magrittr_2.0.1     ellipsis_0.3.2    
[33] htmltools_0.5.2    assertthat_0.2.1   textshape_1.7.3    utf8_1.2.2        
[37] stringi_1.7.5      crayon_1.4.1   
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant