% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lexical_analysis.R
\name{spacy_parse_full}
\alias{spacy_parse_full}
\title{Parse Texts with spaCy}
\usage{
spacy_parse_full(
  x,
  pos = TRUE,
  tag = TRUE,
  lemma = TRUE,
  entity = FALSE,
  dependency = FALSE,
  morph = FALSE,
  model = "en_core_web_sm"
)
}
\arguments{
\item{x}{Character vector of texts OR a quanteda tokens object.}

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

\item{tag}{Logical; include fine-grained tags (default: TRUE).}

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

\item{entity}{Logical; include named entity tags (default: FALSE).}

\item{dependency}{Logical; include dependency relations (default: FALSE).}

\item{morph}{Logical; include morphological features (default: FALSE).}

\item{model}{Character; spaCy model to use (default: "en_core_web_sm").}
}
\value{
A data frame with token-level annotations including:
\itemize{
\item \code{doc_id}: Document identifier
\item \code{sentence_id}: Sentence number within document
\item \code{token_id}: Token position within sentence
\item \code{token}: Original token text
\item \code{pos}: Coarse POS tag (if pos = TRUE)
\item \code{tag}: Fine-grained tag (if tag = TRUE)
\item \code{lemma}: Lemmatized form (if lemma = TRUE)
\item \code{entity}: Named entity tag (if entity = TRUE)
\item \code{head_token_id}: Head token ID (if dependency = TRUE)
\item \code{dep_rel}: Dependency relation (if dependency = TRUE)
\item \code{morph}: Morphological features string (if morph = TRUE)
}
}
\description{
Parse texts using spaCy and return token-level annotations.
This is the main parsing function for NLP analysis.
Works with character vectors or quanteda tokens objects.
}
\examples{
if (interactive()) {
# From SpecialEduTech dataset
texts <- TextAnalysisR::SpecialEduTech$abstract[1:5]
parsed <- spacy_parse_full(texts, morph = TRUE)

# From quanteda tokens
united <- unite_cols(TextAnalysisR::SpecialEduTech, c("title", "abstract"))
tokens <- prep_texts(united, text_field = "united_texts")
parsed <- spacy_parse_full(tokens, morph = TRUE)
}
}
\concept{lexical}
