#' Inflects a given lemma
#'
#' @param word An inflected word
#' @param lang The language of the word
#'
#' @return A dataframe of the lemma and features of the given word
#' @export
#'
#' @examples
#' analyze_word("word", lang="eng")
analyze_word <- function(word, lang){
lemma_and_features <- .pkg.env$unimorph$analyze_word(word, lang = lang)
read.csv(text=lemma_and_features,
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.