diff options
author | Taku Kudo <taku910@users.noreply.github.com> | 2018-05-03 18:11:17 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-03 18:11:17 +0300 |
commit | 77ec954d23591cd5180f4d6160c7862c600c4b09 (patch) | |
tree | 5d01d0f3b80428a3c1b2ae58594c5935e6f90d0d /src | |
parent | 63983329c59a52366ce39031065e84442e32f66b (diff) |
Update sentencepiece_processor.h
Diffstat (limited to 'src')
-rw-r--r-- | src/sentencepiece_processor.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sentencepiece_processor.h b/src/sentencepiece_processor.h index ff41143..30854eb 100644 --- a/src/sentencepiece_processor.h +++ b/src/sentencepiece_processor.h @@ -197,8 +197,10 @@ class SentencePieceProcessor { // forward-filtering and backward-sampling algorithm. // `alpha` is a smoothing parameter. The best segmentation // (Viterbi segmentation) is more likely sampled when setting larger - // alpha (alpha >= 1.0). When alpha is 0.0, one segmentation is - // uniformly sampled from the nbest or lattice. + // alpha. When alpha is 0.0, one segmentation is uniformly sampled from the + // nbest or lattice. + // `nbest_size` and `alpha` correspond to parameters `l` and `alpha` + // in https://arxiv.org/abs/1804.10959 (nbest_size < 0 means l = infinity) virtual util::Status SampleEncode(const std::string &input, int nbest_size, float alpha, std::vector<std::string> *pieces) const; |