共用方式為


Bpe 類別

定義

代表位元組配對編碼模型。

public sealed class Bpe : Microsoft.ML.Tokenizers.Model
type Bpe = class
    inherit Model
Public NotInheritable Class Bpe
Inherits Model
繼承

建構函式

Bpe()

建構沒有標記化詞彙的新 Bpe 模型物件。 此建構函式只有在定型案例中才有用。

Bpe(String, String, String, String, String)

建構新的 Bpe 模型物件,以用於句子標記化和 Tokenizer 定型。

屬性

ContinuingSubwordPrefix

任何只存在於另一個子字後面的選擇性前置詞

Decoder

取得 Bpe 譯碼器物件。

EndOfWordSuffix

要描述和字尾子字的選擇性後置詞

FuseUnknownTokens

取得或設定是否允許多個未知的令牌融合

UnknownToken

取得或設定未知的令牌。 當我們遇到未知字元時要使用的未知令牌

方法

GetTrainer()

取得定型器物件,用於定型模型,併產生詞彙和合併數據。

GetVocab()

取得字典將令牌對應至標識碼。

GetVocabSize()

取得將令牌對應至標識符的字典大小。

IdToString(Int32, Boolean)

將令牌化標識碼對應至令牌。

IdToToken(Int32, Boolean)

將令牌化標識碼對應至令牌。

IsValidChar(Char)

代表位元組配對編碼模型。

Save(String, String)

將模型數據儲存到詞彙中,並合併檔案。

Tokenize(String)

將序列字串令牌化為令牌清單。

TokenToId(String)

將令牌對應至令牌化標識碼。

適用於