Repository navigation
0.3.7
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 anytsAdded
- The form of an auxiliary in the clause checks.
predicate_formreads an auxiliary that the model leaves withoutVerbFormthrough the language hookauxiliary_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_headandis_infinitive_clause_headtakeauxiliary_form.SyntaxStatshas 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_headandis_infinitive_clause_head, the default ofis_clause_headis nowNone.Nonemeansis_clause_headof the module with the hooks of the call. Before, a call withis_infinitive_periphrasisorauxiliary_formand nois_clause_headread 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?givescuatro.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_lemmasandno_possay 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_formwith 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
- Documentation: https://sergeyshk.github.io/anyTS/
- PyPI: https://pypi.org/project/anyts/
- Changes: 0.3.6...0.3.7