text icon indicating copy to clipboard operation
text copied to clipboard

Fix documentation and naming of torchtext.experimental.vocab factory functions.

Open cpuhrsch opened this issue 4 years ago • 2 comments

a) The documentation doesn't clearly state that one factory function is meant to be used to construct a Vocabulary from a dataset (e.g. AG_NEWS) and another is meant to be used to load a vocabulary from a text file that contains a list of tokens (as you might construct when filtering and sorting text files on the command line). b) factory function vocab_from_file_object doesn't exist.

cpuhrsch avatar Sep 19 '20 19:09 cpuhrsch

there was a back and forth that the names of the functions were changed from load_from_file_object to load_from_file

zhangguanheng66 avatar Sep 20 '20 15:09 zhangguanheng66

Codecov Report

Merging #991 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #991   +/-   ##
=======================================
  Coverage   77.70%   77.70%           
=======================================
  Files          44       44           
  Lines        3099     3099           
=======================================
  Hits         2408     2408           
  Misses        691      691           
Impacted Files Coverage Δ
torchtext/experimental/transforms.py 87.50% <ø> (ø)
torchtext/experimental/vocab.py 100.00% <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 0302ea9...15bdd06. Read the comment docs.

codecov[bot] avatar Sep 20 '20 20:09 codecov[bot]

closing stale PR

rshraga avatar Mar 14 '23 18:03 rshraga