% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lexical_analysis.R
\name{extract_morphology}
\alias{extract_morphology}
\title{Extract Morphological Features}
\usage{
extract_morphology(
  tokens,
  features = c("Number", "Tense", "VerbForm", "Person", "Case", "Mood", "Aspect"),
  include_pos = TRUE,
  include_lemma = TRUE,
  model = "en_core_web_sm"
)
}
\arguments{
\item{tokens}{A quanteda tokens object or character vector of texts.}

\item{features}{Character vector of morphological features to extract.
Default includes common Universal Dependencies features.}

\item{include_pos}{Logical; include POS tags (default: TRUE).}

\item{include_lemma}{Logical; include lemmatized forms (default: TRUE).}

\item{model}{Character; spaCy model to use (default: "en_core_web_sm").}
}
\value{
A data frame with token-level morphological annotations including
morph_* columns for each requested feature.
}
\description{
Uses spaCy to extract morphological features from text.
Returns data with Number, Tense, VerbForm, Person, Case, Mood, Aspect, etc.
}
\details{
Morphological features follow Universal Dependencies annotation.
Common features include:
\itemize{
\item \code{Number}: Sing (singular), Plur (plural)
\item \code{Tense}: Past, Pres (present), Fut (future)
\item \code{VerbForm}: Fin (finite), Inf (infinitive), Part (participle), Ger (gerund)
\item \code{Person}: 1, 2, 3 (first, second, third person)
\item \code{Case}: Nom (nominative), Acc (accusative), Gen (genitive), Dat (dative)
\item \code{Mood}: Ind (indicative), Imp (imperative), Sub (subjunctive)
\item \code{Aspect}: Perf (perfective), Imp (imperfective), Prog (progressive)
}
}
\examples{
if (interactive()) {
  tokens <- quanteda::tokens(TextAnalysisR::SpecialEduTech$abstract[1])
  morphology_data <- extract_morphology(tokens)
  print(morphology_data)
}
}
\concept{lexical}
