_helpers
Shared helpers for scholar-facing export formats.
iter_sentences
Return sentence list with stable ordering and optional slicing.
Source code in cltk/exports/_helpers.py
iter_words
Return sentence words in stable order.
Source code in cltk/exports/_helpers.py
get_token_text
get_lemma
get_upos_tag
Return UPOS tag or name in a stable string form.
Source code in cltk/exports/_helpers.py
get_feature_map
Return a flat feature map from UD features.
Source code in cltk/exports/_helpers.py
format_features
Serialize UD features into a sorted Key=Val string.
format_morph
Return a compact UD-like morph string (UPOS + FEATS).
get_gloss
Return gloss text using prioritized enrichment fallbacks.
Source code in cltk/exports/_helpers.py
get_ipa
Return IPA value and mode when available.
Source code in cltk/exports/_helpers.py
sentence_text
Return sentence surface text with safe fallbacks.
Source code in cltk/exports/_helpers.py
make_sentence_id
make_token_id
make_root_id
safe_xml_id
html_escape
latex_escape
Escape LaTeX special characters in a string.