Skip to content

0.3.7

Choose a tag to compare

@SergeyShk SergeyShk released this 22 Oct 22:50
· 102 commits to master since this release
a6c1e2d

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

  • The form of an auxiliary in the clause checks. predicate_form reads an auxiliary that the model leaves without VerbForm through the language hook auxiliary_form. Until now the clause checks called it without the hook. As a result, a predicate whose finite auxiliary has no form read as a participle and headed no clause, as in the Spanish Sé que os habéis posado.
    • is_clause_head, is_infinitive_clause, is_subordinate_clause_head and is_infinitive_clause_head take auxiliary_form.
    • SyntaxStats has a hook of the same name. By default it returns an empty string, which skips the auxiliary as before.

Behaviour changes

  • In is_infinitive_clause, is_subordinate_clause_head and is_infinitive_clause_head, the default of is_clause_head is now None. None means is_clause_head of the module with the hooks of the call. Before, a call with is_infinitive_periphrasis or auxiliary_form and no is_clause_head read the word it completes without those hooks.
  • In split_windows, symmetric marks after a closing mark close the previous window only when whitespace follows them. A dash glued to the next word now goes with the line of dialogue it opens: cuatro.—¿Cinco? gives cuatro. and —¿Cinco?. A run of such marks moves as a whole, and marks glued to the last word close its window as before.
  • The messages no_parse, no_lemmas and no_pos say how to get the annotation, for example "The data source has no parts of speech: parse the text with a model instead of a blank pipeline". The keys do not change.
  • predicate_form with a hook that is not callable raises "The verb form of an auxiliary must be callable", like the clause checks.

Documentation

The cards of the clause checks and the hooks of SyntaxStats describe auxiliary_form. The section of split_windows gives the new rule for the marks, and kwic-parameters names the error of a window that is not an integer.

Quality

2128 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