Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
20,028 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
2,001 changes: 2,001 additions & 0 deletions
2,001
data-raw/lines.10k.cfo.sample.2000 - Kubernetes (Slackarchive.io).csv
Large diffs are not rendered by default.
Oops, something went wrong.
2,001 changes: 2,001 additions & 0 deletions
2,001
data-raw/lines.10k.cfo.sample.2000 - Lucene-dev mailing list.csv
Large diffs are not rendered by default.
Oops, something went wrong.
10,001 changes: 10,001 additions & 0 deletions
10,001
data-raw/lines.10k.cfo.sample.2000 - Mozilla (Firefox, Core, OS).csv
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
library(devtools) | ||
library(data.table) | ||
|
||
filenames <- c(mozilla="data-raw/lines.10k.cfo.sample.2000 - Mozilla (Firefox, Core, OS).csv", | ||
kubertenes="data-raw/lines.10k.cfo.sample.2000 - Kubernetes (Slackarchive.io).csv", | ||
lucene="data-raw/lines.10k.cfo.sample.2000 - Lucene-dev mailing list.csv") | ||
|
||
MakeFactor <- function(ratings) factor(ratings, labels=c("NL", "Not")) | ||
|
||
nlon.data <- rbindlist(lapply(names(filenames), function(x) { | ||
res <- fread(filenames[x], encoding="UTF-8")[!is.na(Disagreement)] | ||
if (x == "lucene") { | ||
res[, Text := gsub("^[>|\\s]+", "", Text, perl=TRUE)] | ||
} | ||
res <- res[, list(source=x, text=Text, | ||
rater1=MakeFactor(Mika), | ||
rater2=MakeFactor(Fabio))] | ||
fwrite(res, sprintf("data-raw/%s.csv", x)) | ||
res | ||
})) | ||
|
||
devtools::use_data(nlon.data, overwrite=TRUE) |
Large diffs are not rendered by default.
Oops, something went wrong.