Learn R Programming

MadanText (version 0.1.0)

LEMMA: Persian Lemmatization

Description

This function performs lemmatization on a vector of Persian words.

Usage

LEMMA(Y, TYPE)

Value

Returns a character vector where each element is the lemmatized form of the corresponding element in the input vector `Y`. Lemmatization involves removing inflectional endings and returning the word to its base or dictionary form. The length of the returned vector matches the length of the input vector, and each word is lemmatized independently based on the specified suffix types in `TYPE`.

Arguments

Y

A character vector of Persian words.

TYPE

A vector of suffix types for modification.

Examples

Run this code
if (FALSE) {
  words <- c("Persian text here")
  lemmatized_words <- LEMMA(words, TYPE)
}

Run the code above in your browser using DataLab