#' syntagmaticNeighbours
#'
#' Get the syntagmatic neighbours of a word from the predictive derekovecs model.
#' @param word The word to get the syntagmatic neighbours for.
#' @param ... Additional parameters to pass to the API.
#'
#' @return Data frame syntagmatic neighbours of a word from the predictive derekovecs model.
#' @export
syntagmaticNeighbours <- function(word = "Test", ...) {
  derekovecsApiCall("", word = word, json = 1, ...)$collocators
}

#' countbasedCollocates
#'
#' Get the collocates of a word in the count-based dereko model.
#'
#' @param w The word to get the collocates for.
#' @param ... Additional parameters to pass to the API.
#'
#' @return  A data fram with the most salient collcates and their association scores.
#' @export
countbasedCollocates <- function(w = "Test", ...) {
  derekovecsApiCall(method = "/getClassicCollocators", w = w, ...)$collocates
}

#' paradigmaticNeighbours
#'
#' Get the paradigmatic neighbours of a word in the derekovecs model.
#'
#' @param word  The word to get the paradigmatic neighbours for.
#' @param ... Additional parameters to pass to the API.
#' @return  A list of words with their similarity scores.
#' @export
#'
paradigmaticNeighbours <- function(word = "Test", ...) {
  derekovecsApiCall("", word = word, json = 1, ...)$list[[1]]
}

#' collocationScores
#'
#' Calculate the association scores between a node (target word) and words in a window around the it.
#'
#' @param w The target word/node.
#' @param c The collocate.
#' @param ... Additional parameters to pass to the API.
#'
#' @return  A one row data frame with collocate and its association scores.
#' @export
#'
collocationScores <- function(w, c, ...) {
  derekovecsApiCall("/getCollocationAssociation",
                 w = w, c = c, ...)$collocates
}

#' cosineSimilarity
#'
#' @param w1 The first word.
#' @param w2  The second word.
#' @param ... Additional parameters to pass to the API.
#'
#' @return The cosine similarity between the two words.
#' @export
#'
#' @description Calculate the cosine similarity between two words in the derekovecs model.
cosineSimilarity <- function(w1, w2, ...) {
  derekovecsApiCall("/getSimilarity", w1 = w1, w2 = w2, ...)
}

#' DeReKoVecsServer
#'
#' @return The URL of the DeReKoVecs API server.
#' @export
#'
derekovecsServer <- function() {
  api_server <- Sys.getenv("DEREKOVECS_SERVER")
  if (!identical(api_server, "")) {
    return(api_server)
  }
  'https://corpora.ids-mannheim.de/openlab/derekovecs/'
}

#' DeReKoVecsCall
#'
#' Call the DeReKoVecs API.
#'
#' @param method The method to call.
#' @param ... The parameters to pass to the method.
#' @return The result of the call.
#' @importFrom httr2 request req_url_path_append req_url_query req_perform resp_body_json
#'
#' @include utils-pipe.R
#'
derekovecsApiCall <- function(method = "", ...) {
  httr2::request(derekovecsServer()) %>%
    httr2::req_url_path_append(method) %>%
    httr2::req_url_query(...) %>%
    httr2::req_perform() %>%
    httr2::resp_body_json(simplifyVector = TRUE)
}
