From d36fa98e9610b2d23b872d9d1b62bf18f79e5844 Mon Sep 17 00:00:00 2001 From: "Dr. Christoph Mittendorf" <34183942+Cassini-chris@users.noreply.github.com> Date: Thu, 23 May 2024 21:46:38 +0200 Subject: [PATCH] fixing minor typos in the API.md --- doc/api.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api.md b/doc/api.md index 27b78c50..de47c949 100644 --- a/doc/api.md +++ b/doc/api.md @@ -15,7 +15,7 @@ if (!status.ok()) { } // You can also load a serialized model from std::string. -// const std::stirng str = // Load blob contents from a file. +// const std::string str = // Load blob contents from a file. // auto status = processor.LoadFromSerializedProto(str); ``` @@ -64,7 +64,7 @@ processor.SampleEncode("This is a test.", &pieces, -1, 0.2); std::vector ids; processor.SampleEncode("This is a test.", &ids, -1, 0.2); ``` -SampleEncode has two sampling parameters, `nbest_size` and `alpha`, which correspond to `l` and `alpha` in the [original paper](https://arxiv.org/abs/1804.10959). When `nbest_size` is -1, one segmentation is sampled from all hypothesis with forward-filtering and backward sampling algorithm. +SampleEncode has two sampling parameters, `nbest_size` and `alpha`, which correspond to `l` and `alpha` in the [original paper](https://arxiv.org/abs/1804.10959). When `nbest_size` is -1, one segmentation is sampled from all hypotheses with forward-filtering and backward sampling algorithm. ## Training Calls `SentencePieceTrainer::Train` function to train sentencepiece model. You can pass the same parameters of [spm_train](https://github.com/google/sentencepiece#train-sentencepiece-model) as a single string.