Skip to content

0.3.8

Choose a tag to compare

@SergeyShk SergeyShk released this 23 Oct 15:37
· 96 commits to master since this release
4be4b15

A patch release of anyTS, the language-independent core of the text statistics libraries ruTS (Russian) and esTS (Spanish).

Requirements

Python 3.11 or newer, numpy 1.26, pandas 2.1, scipy 1.11, spaCy 3.8.15, matplotlib 3.8 and graphviz 0.20.3 or newer.

pip install anyts

Added

  • ConnectorMatcher.parcellation. This attribute lists the connectors, by their text, that are never subordinators whatever their part of speech: a sentence they open is linked to the one before. is_subordinator reads it, so a library no longer overrides the method for this.
  • anyts.utils.is_language(value). It checks whether a value is a Language pipeline of spaCy without importing spaCy, like is_doc and is_span.

Behaviour changes

  • Flat keys. describe gives None for every key of get_stats(flat=True), including the keys of a class that counts per-word values in its own get_stats (describe("pos_NOUN")). The statistics are computed only for a name that begins with the name of a statistic, so a typo still raises UnknownStatError at once.
  • Narrowed presets. A subclass of ReadabilityStats may narrow presets and keep the scales by preset it inherits from a readability class. The scales a class sets itself or takes from a mixin are still checked when the class is defined.

Quality

2135 tests pass with 100% line and branch coverage. CI runs on Python 3.11–3.14, on Linux, Windows and macOS, and with the lowest versions of the dependencies.

Links