obulat / zeyrek

Python morphological analyzer for Turkish language. Partial port of ZemberekNLP.
https://zeyrek.readthedocs.io/en/latest/
MIT License
47 stars 8 forks source link

Add type hints #27

Closed obulat closed 1 year ago

obulat commented 1 year ago

This PR adds type hints to 4 files.

It also fixes the problem with ref_item for compound words: it was set to None previously.

The SingleAnalysis and Parse named tuples are also rewritten to make them easier to work with.

codecov[bot] commented 1 year ago

Codecov Report

Merging #27 (2a53168) into main (4d036b6) will increase coverage by 0.03%. The diff coverage is 92.00%.

@@            Coverage Diff             @@
##             main      #27      +/-   ##
==========================================
+ Coverage   86.76%   86.79%   +0.03%     
==========================================
  Files          10       10              
  Lines        2939     2961      +22     
==========================================
+ Hits         2550     2570      +20     
- Misses        389      391       +2     
Impacted Files Coverage Δ
zeyrek/formatters.py 21.50% <75.86%> (+2.93%) :arrow_up:
zeyrek/morphology.py 82.19% <88.88%> (+1.30%) :arrow_up:
zeyrek/rulebasedanalyzer.py 87.02% <94.11%> (+0.03%) :arrow_up:
zeyrek/morphotactics.py 96.35% <96.87%> (+0.06%) :arrow_up:
zeyrek/lexicon.py 89.06% <100.00%> (-0.12%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more