quanteda / quanteda.textstats

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

Remove data.table #31

Closed kbenoit closed 3 years ago

kbenoit commented 3 years ago

Removes the dependency on data.table, which was previously used in

(It was also used in legacy textstat_keyness() functions, but these were removed in #30.)

I checked these against the data.table versions and the performance is equivalent. textstat_frequency() is still slightly faster with the older data.table due to the efficiency of frank(), but it is still acceptably fast using base::rank().

Solves #5 (and one more for a bonus)

codecov[bot] commented 3 years ago

Codecov Report

Merging #31 (66f6054) into master (63111eb) will decrease coverage by 0.16%. The diff coverage is 98.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #31      +/-   ##
==========================================
- Coverage   98.46%   98.29%   -0.17%     
==========================================
  Files          12       12              
  Lines         780      761      -19     
==========================================
- Hits          768      748      -20     
- Misses         12       13       +1     
Impacted Files Coverage Δ
R/textstat-methods.R 88.88% <66.66%> (ø)
R/textstat_readability.R 99.50% <98.80%> (-0.50%) :arrow_down:
R/nscrabble.R 100.00% <100.00%> (ø)
R/nsyllable-methods.R 100.00% <100.00%> (ø)
R/textstat_entropy.R 100.00% <100.00%> (ø)
R/textstat_frequency.R 100.00% <100.00%> (ø)
R/textstat_lexdiv.R 97.90% <100.00%> (ø)
R/textstat_simil.R 97.95% <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 63111eb...c7a49b1. Read the comment docs.