Repository navigation
0.4.1
A patch of anyTS with the fixes found while moving ruTS onto anyTS 0.4, and one helper both libraries need for the syntax features of their comparison of corpora.
Requirements
The same as anyTS 0.4.0: Python 3.11 or newer, spaCy 3.8.15 or newer within 3, preshed 3.0.11 or newer except 3.0.14.
pip install anyts==0.4.1Changes of numbers
- Verb phrases of L2SCA. An infinitive that makes one predicate with its head (
SyntaxStats.is_infinitive_periphrasis), asked of the infinitive and of every infinitive conjunct above it, is part of the verb phrase of its head, as it is part of its clause: a modal or phasal verb with an infinitive gives one verb phrase, as English can leave does.verb_phrases_per_t_unitof ruTS falls by 1-16 % on 11 of its 36 parsed snapshot texts; nothing else of the snapshot changes. - Words without syllables in the formulas of other languages. A word without syllables (a number, a preposition of one consonant) counts as monosyllabic in FORCAST and the Wiener Sachtextformeln and as easy in Linsear Write, as in textstat. The functions
calc_*take the same counts as before;UnadaptedReadabilityStatspasses the new ones.
Features
set_sent_starts(doc, starts)inanyts.utils: sets the sentences of aDocby the character offsets of their starts, those of the segmenter of a library, so that the parser,senterorsentencizerkeeps them; the whitespace stays with the sentence before it.
Fixes
keynessnames why a corpus gives no frequencies: no words aFrequencyReferencekeeps, texts shorter thannwords, or no words.MorphStatschecks and reads a mapping of features shared by the words of one form once: a library that shares them builds the statistics faster (ruTS: 0.288 → 0.265 s on 39,000 words).- Docs: the rule of verb phrases in the card of L2SCA and in the hooks of
SyntaxStats, the rule of words without syllables for the formulas of other languages, the statistics (not counts) ofBasicStats.print_stats, the tags ofMorphStatswithout a visible backslash.
Links
- Documentation: https://sergeyshk.github.io/anyTS/
- PyPI: https://pypi.org/project/anyts/