summary refs log tree commit diff
diff options
context:
space:
mode:
authorLars-Dominik Braun <ldb@leibniz-psychology.org>2021-03-15 09:28:28 +0100
committerLars-Dominik Braun <ldb@leibniz-psychology.org>2021-03-15 10:52:59 +0100
commitbc82567b0bd69e630ae82e77943d5726f0af9e36 (patch)
treed51d6f648d009401b28a4ba8925b083e7bf8a812
parentd332c5c7f2dcf9e3562a411cff2fa43808a326a3 (diff)
downloadguix-bc82567b0bd69e630ae82e77943d5726f0af9e36.tar.gz
gnu: Add r-syuzhet.
* gnu/packages/cran.scm (r-syuzhet): New variable.
-rw-r--r--gnu/packages/cran.scm38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/cran.scm b/gnu/packages/cran.scm
index dd37ae0d6c..6f8230278e 100644
--- a/gnu/packages/cran.scm
+++ b/gnu/packages/cran.scm
@@ -27426,3 +27426,41 @@ in same length matches).")
     (description
       "Tools that can be used to reshape and restructure text data.")
     (license license:gpl2)))
+
+(define-public r-syuzhet
+  (package
+    (name "r-syuzhet")
+    (version "1.0.6")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (cran-uri "syuzhet" version))
+        (sha256
+          (base32
+            "16iccqdbw02iw82nah6kwz3gwfghi864j2y698n4b9dyc386ijzv"))))
+    (properties `((upstream-name . "syuzhet")))
+    (build-system r-build-system)
+    (propagated-inputs
+      `(("r-dplyr" ,r-dplyr)
+        ("r-dtt" ,r-dtt)
+        ("r-nlp" ,r-nlp)
+        ("r-rlang" ,r-rlang)
+        ("r-textshape" ,r-textshape)
+        ("r-tidyr" ,r-tidyr)
+        ("r-zoo" ,r-zoo)))
+    (native-inputs `(("r-knitr" ,r-knitr)))
+    (home-page "https://github.com/mjockers/syuzhet")
+    (synopsis
+      "Extracts Sentiment and Sentiment-Derived Plot Arcs from Text")
+    (description
+      "Extracts sentiment and sentiment-derived plot arcs from text using a
+variety of sentiment dictionaries conveniently packaged for consumption by R
+users.  Implemented dictionaries include @dfn{syuzhet} (default) developed in the
+Nebraska Literary Lab, @dfn{afinn} developed by Finn Arup Nielsen, @dfn{bing}
+developed by Minqing Hu and Bing Liu, and @dfn{nrc} developed by Mohammad, Saif
+M.  and Turney, Peter D.  Applicable references are available in
+@file{README.md} and in the documentation for the @code{get_sentiment}
+function.  The package also provides a hack for implementing Stanford's coreNLP
+sentiment parser.  The package provides several methods for plot arc
+normalization.")
+    (license license:gpl3)))