Skip to content

Commit 9fe75be

Browse files
committed
bugfix
1 parent 6cb5198 commit 9fe75be

2 files changed

Lines changed: 0 additions & 12 deletions

File tree

server/preprocessing/other-scripts/base.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ get_papers <- function(query, params,
101101
} else {
102102
custom_clustering_query <- paste("dcsubject:", cc, "*", sep="")
103103
base_query <- paste(base_query, custom_clustering_query)
104-
custom_clustering_query <- paste('"', cc, '"', sep="")
105-
base_query <- paste(base_query, custom_clustering_query)
106104
}
107105
}
108106

server/preprocessing/other-scripts/features.R

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ TypeCountTokenizer <- function(x) {
77

88

99
create_corpus <- function(metadata, text, stops) {
10-
# log text example content
11-
vflog$info(paste("vis_id:", .GlobalEnv$VIS_ID, "text example content:", text$content[1], collapse="\n"))
1210
docs <- data.frame(doc_id = text$id, text = text$content)
1311
corpus <- VCorpus(DataframeSource(docs))
1412

@@ -32,15 +30,7 @@ create_corpus <- function(metadata, text, stops) {
3230

3331

3432
create_tdm_matrix <- function(corpus, sparsity=1) {
35-
# log example content from the corpus object
36-
vflog$info(paste("vis_id:", .GlobalEnv$VIS_ID, "corpus example content:", corpus[[1]]$content, collapse="\n"))
3733
tdm <- TermDocumentMatrix(corpus)
38-
# log all available information about tdm
39-
vflog$info(paste("vis_id:", .GlobalEnv$VIS_ID, "tdm dimensions:", dim(tdm)))
40-
vflog$info(paste("vis_id:", .GlobalEnv$VIS_ID, "tdm sparsity:", sum(tdm == 0) / prod(dim(tdm))))
41-
vflog$info(paste("vis_id:", .GlobalEnv$VIS_ID, "tdm max value:", max(tdm)))
42-
vflog$info(paste("vis_id:", .GlobalEnv$VIS_ID, "tdm min value:", min(tdm)))
43-
vflog$info(paste("vis_id:", .GlobalEnv$VIS_ID, "tdm NA values:", sum(is.na(tdm))))
4434
if(sparsity < 1) {
4535
tdm <- removeSparseTerms(tdm, sparsity)
4636
}

0 commit comments

Comments
 (0)