quanteda / quanteda.textstats

Textual statistics for quanteda
GNU General Public License v3.0
14 stars 2 forks source link

Fix Yule's K computation #47

Closed kbenoit closed 2 years ago

kbenoit commented 2 years ago

The previous formula had omitted a -1/N in the formula. Corrected now with tests to compare results to koRpus and to a published result (although that publication has computation and/or rounding errors).

Closes #46.

codecov[bot] commented 2 years ago

Codecov Report

Merging #47 (b8ed442) into master (a9bd8f7) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #47   +/-   ##
=======================================
  Coverage   82.20%   82.20%           
=======================================
  Files          16       16           
  Lines        1152     1152           
=======================================
  Hits          947      947           
  Misses        205      205           
Impacted Files Coverage Δ
R/textstat_lexdiv.R 97.90% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a9bd8f7...b8ed442. Read the comment docs.