#' Inflects a given lemma
#'
#' @param word The word to inflect
#' @param features The morphological features desired
#' @param lang The language of the word
#'
#' @return A dataframe of the desired inflections
#' @export
#'
#' @examples
#' inflect_word("word", lang="eng")
inflect_word <- function(word, lang, features = NULL){
inflected_paradigm <- .pkg.env$unimorph$inflect_word(word, features = features, lang = lang)
read.csv(text=inflected_paradigm,
sep="\t",
col.names = c("lemma", "inflected", "features"),
header = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.