Overview of TextDescriptives features and functionality
mainTextDescriptives is a Python package built on top of spaCy designed to extract a wide variety of document-level linguistic metrics. It provides modular spaCy pipeline components that can be added to existing workflows to calculate:
- Descriptive Statistics: Token counts (total, unique), character counts, and statistical measures (mean, median, std dev) for token length, sentence length, and syllables per token.
- Readability: Standard indices including Gunning-Fog, SMOG, Flesch reading ease, Flesch-Kincaid grade, Automated Readability Index, Coleman-Liau, Lix, and Rix.
- Dependency Distance: Mean and standard deviation of the distance between a word and its head, and proportions of adjacent dependency relations.
- POS Proportions: Proportions of all part-of-speech tags in the document.
- Coherence: First- and second-order coherence based on word embedding similarity between sentences.
- Information Theory: Shannon entropy and perplexity.
- Quality: Metrics for filtering low-quality text, including stop word counts, symbol-to-word ratios, ellipsis/bullet point proportions, and repetitious text detection (duplicate lines, paragraphs, or n-grams).