NIHOPA / NLPre

Python library for Natural Language Preprocessing (NLPre)
190 stars 34 forks source link

Develop/faster replace from dict #98

Closed thoppe closed 7 years ago

thoppe commented 7 years ago

This update makes it much faster, almost by 2 orders of magnitude!

   function                        time(x50) fraction
   token_replacement               0.000007  0.000082
   unidecoder                      0.000008  0.000097
   dedash                          0.000340  0.004072
   titlecaps                       0.001735  0.020745
   decaps_text                     0.002472  0.029570
   replace_acronyms                0.006495  0.077685
   identify_parenthetical_phrases  0.006601  0.078951
   separated_parenthesis           0.006701  0.080145
   replace_from_dictionary         0.025758  0.308071
   pos_tokenizer                   0.033493  0.400582
codecov-io commented 7 years ago

Codecov Report

Merging #98 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #98   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          18     18           
  Lines         655    653    -2     
=====================================
- Hits          655    653    -2
Impacted Files Coverage Δ
nlpre/_version.py 100% <100%> (ø) :arrow_up:
nlpre/replace_from_dictionary.py 100% <100%> (ø) :arrow_up:

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 dd528e9...6949583. Read the comment docs.