Ignore first letter case in stopwords
Change-Id: Ibe0301e89c2602bd59b4a6d91de3437e413e9c3f
diff --git a/R/collocationAnalysis.R b/R/collocationAnalysis.R
index d314b68..8435c6c 100644
--- a/R/collocationAnalysis.R
+++ b/R/collocationAnalysis.R
@@ -1131,7 +1131,7 @@
#' @return Vector of synsemantic stopwords.
#' @export
synsemanticStopwords <- function(...) {
- res <- c(
+ base <- c(
"der",
"die",
"und",
@@ -1145,28 +1145,23 @@
"ist",
"auf",
"sich",
- "Die",
"des",
"dem",
"nicht",
"ein",
- "Ein",
"eine",
- "Eine",
"es",
"auch",
"an",
"als",
"am",
"aus",
- "Der",
"bei",
"er",
"dass",
"sie",
"nach",
"um",
- "Das",
"zum",
"noch",
"war",
@@ -1179,14 +1174,14 @@
"\u00fcber",
"so",
"aber",
- "Eine",
"diese",
- "Diese",
- "oder",
- "Es",
- "Und"
+ "oder"
)
- return(res)
+
+ lower <- unique(tolower(base))
+ capitalized <- paste0(toupper(substr(lower, 1, 1)), substring(lower, 2))
+
+ unique(c(lower, capitalized))
}