diff --git a/R/query_gen_actors.R b/R/query_gen_actors.R index befa37a..dfddd25 100644 --- a/R/query_gen_actors.R +++ b/R/query_gen_actors.R @@ -2,7 +2,6 @@ #' #' Generate actor search queries based on data in actor db #' @param actor A row from the output of elasticizer() when run on the 'actor' index -#' @param country 2-letter string indicating the country for which to generate the queries, is related to inflected nouns, definitive forms and genitive forms of names etc. #' @param pre_tags Highlighter pre-tag #' @param post_tags Highlighter post-tag #' @return A data frame containing the queries, related actor ids and actor function @@ -13,7 +12,7 @@ ################################################################################################# #################################### Actor search query generator ############################### ################################################################################################# -query_gen_actors <- function(actor, country, pre_tags, post_tags) { +query_gen_actors <- function(actor, pre_tags, post_tags) { generator <- function(country, startdate, enddate, querystring, pre_tags, post_tags, actorid) { return(paste0('{"_source": ["ud","title","subtitle","preteaser","teaser","text"], "query": @@ -56,6 +55,7 @@ query_gen_actors <- function(actor, country, pre_tags, post_tags) { paste0('\\"',grid[row,]$first,' ',grid[row,]$last,'\\"~',grid[row,]$prox) ) } + country <- actor$`_source.country` ### Setting linguistic forms for each country ### if (country == "no" | country == "dk") { genitive <- 's' diff --git a/man/query_gen_actors.Rd b/man/query_gen_actors.Rd index 5e2de37..11d9c19 100644 --- a/man/query_gen_actors.Rd +++ b/man/query_gen_actors.Rd @@ -4,13 +4,11 @@ \alias{query_gen_actors} \title{Generate actor search queries based on data in actor db} \usage{ -query_gen_actors(actor, country, pre_tags, post_tags) +query_gen_actors(actor, pre_tags, post_tags) } \arguments{ \item{actor}{A row from the output of elasticizer() when run on the 'actor' index} -\item{country}{2-letter string indicating the country for which to generate the queries, is related to inflected nouns, definitive forms and genitive forms of names etc.} - \item{pre_tags}{Highlighter pre-tag} \item{post_tags}{Highlighter post-tag}