dupe_detect: Reset the _delete value to 1

out_parser: fix to sentence parsing, add additional (empty) string at end of merged field, to make merged field end on .
master
Erik de Vries 6 years ago
parent ea8cfb071f
commit d0e9bf565b

@ -49,7 +49,7 @@ dupe_detect <- function(row, grid, cutoff_lower, cutoff_upper = 1, es_pwd, es_su
# file = paste0(getwd(),'/remove_ids.txt'),
# append=T)
dupe_delete <- data.frame(id=unique(rownames(which(simil >= cutoff_lower & simil <= cutoff_upper, arr.ind = TRUE))),
dupe_delete = rep(2,length(unique(rownames(which(simil >= cutoff_lower & simil <= cutoff_upper, arr.ind = TRUE))))))
dupe_delete = rep(1,length(unique(rownames(which(simil >= cutoff_lower & simil <= cutoff_upper, arr.ind = TRUE))))))
bulk <- c(apply(df, 1, bulk_writer, varname='duplicates', type = 'set', ver = ver),
apply(dupe_delete, 1, bulk_writer, varname='_delete', type = 'set', ver = ver))
if (length(bulk) > 0) {

@ -39,6 +39,7 @@ out_parser <- function(out, field) {
out$highlight.preteaser,
out$highlight.teaser,
out$highlight.text,
'',
sep = ". ")
}
@ -54,6 +55,7 @@ out_parser <- function(out, field) {
out$`_source.preteaser`,
out$`_source.teaser`,
out$`_source.text`,
'',
sep = ". ")
}

Loading…
Cancel
Save