Add wordFrequency function

Resolves #1

Change-Id: Ifba8630d09559c1c3c31343fbdc3c849dae7d4ca
diff --git a/R/derekovecs.R b/R/derekovecs.R
index 5d61f2c..9120991 100644
--- a/R/derekovecs.R
+++ b/R/derekovecs.R
@@ -35,6 +35,20 @@
   derekovecsApiCall(method = "/getClassicCollocators", w = w, ...)$collocates
 }
 
+#' Get word frequency
+#'
+#' Gets the absolute frequency of a word in the corpus.
+#'
+#' @param w  The word to get the frequency of.
+#' @param ... Additional parameters to pass to the API.
+#'
+#' @return  The absolute frequency of the word.
+#' @export
+wordFrequency <- function(w = "Test", ...) {
+  derekovecsApiCall(method = "/getClassicCollocators", w = w, ...)$f1
+}
+
+
 #' Get paradigmatic neighbours
 #'
 #' Get the paradigmatic neighbours of a word in the derekovecs model.