Language

SentencePieceTokenizer クラス

定義

SentencePieceBpe は、SentencePiece Bpe モデルを使用して入力をトークンに分割するトークナイザーです。

public class SentencePieceTokenizer : Microsoft.ML.Tokenizers.Tokenizer
type SentencePieceTokenizer = class
    inherit Tokenizer
Public Class SentencePieceTokenizer
Inherits Tokenizer
継承
SentencePieceTokenizer
派生

プロパティ

名前 説明
AddBeginningOfSentence

エンコード中に文トークンの先頭を出力することを示します。

AddDummyPrefix

正規化とエンコード中に、文トークンの先頭にプレフィックス文字 U+2581 を出力することを示します。

AddEndOfSentence

エンコード中に文の末尾トークンを出力することを示します。

BeginningOfSentenceId

文トークンの先頭の ID。

BeginningOfSentenceToken

文トークンの先頭。

ByteFallback

エンコード プロセス中に不明なトークンが検出されたときに、モデルがバイト フォールバックを実行するかどうかを指定します。

EndOfSentenceId

文の末尾トークンの ID。

EndOfSentenceToken

文トークンの末尾。

EscapeWhiteSpaces

正規化とエンコード中にスペースを文字 U+2581 に置き換える必要があるかどうかを示します。

Normalizer

トークナイザーで使用されているノーマライザーを取得します。

PreTokenizer

トークナイザーで使用される PreTokenizer を取得します。

SpecialTokens

特殊なトークン。

TreatWhitespaceAsSuffix

正規化とエンコード中に文トークンの先頭ではなく、最後の文トークンの末尾に文字 U+2581 を出力することを示します。

UnknownId

不明なトークンの ID。

UnknownToken

不明なトークン。

Vocabulary

モデルのボキャブラリ。

メソッド

名前 説明
CountTokens(ReadOnlySpan<Char>, Boolean, Boolean, Boolean, Boolean, String, Int32, Int32)

入力テキストがエンコードされるトークンの数を取得します。

CountTokens(ReadOnlySpan<Char>, Boolean, Boolean, Boolean, Boolean)

入力テキストがエンコードされるトークンの数を取得します。

CountTokens(ReadOnlySpan<Char>, Boolean, Boolean)

入力テキストがエンコードされるトークンの数を取得します。

(継承元 Tokenizer)
CountTokens(String, Boolean, Boolean, Boolean, Boolean, String, Int32, Int32)

入力テキストがエンコードされるトークンの数を取得します。

CountTokens(String, Boolean, Boolean, Boolean, Boolean)

入力テキストがエンコードされるトークンの数を取得します。

CountTokens(String, Boolean, Boolean)

入力テキストがエンコードされるトークンの数を取得します。

(継承元 Tokenizer)
CountTokens(String, ReadOnlySpan<Char>, EncodeSettings)

入力テキストがエンコードされるトークンの数を取得します。

Create(Stream, Boolean, Boolean, IReadOnlyDictionary<String,Int32>)

SentencePieceTokenizer のインスタンスを作成します。 モデル ストリームには、次のドキュメントで指定されている SentencePiece モデルが含まれている必要があります: https://github.com/google/sentencepiece/blob/master/src/sentencepiece_model.proto。

Decode(IEnumerable<Int32>, Boolean)

指定した ID を文字列にデコードします。

Decode(IEnumerable<Int32>, Span<Char>, Boolean, Int32, Int32)

指定された ID をテキストにデコードし、結果を destination スパンに格納します。

Decode(IEnumerable<Int32>, Span<Char>, Int32, Int32)

指定された ID をテキストにデコードし、結果を destination スパンに格納します。

Decode(IEnumerable<Int32>)

指定した ID を文字列にデコードします。

EncodeToIds(ReadOnlySpan<Char>, Boolean, Boolean, Boolean, Boolean)

入力テキストをトークン ID にエンコードします。

EncodeToIds(ReadOnlySpan<Char>, Boolean, Boolean, Int32, String, Int32, Boolean, Boolean)

最大トークン数までのトークン ID に入力テキストをエンコードします。

EncodeToIds(ReadOnlySpan<Char>, Boolean, Boolean)

入力テキストをトークン ID にエンコードします。

(継承元 Tokenizer)
EncodeToIds(ReadOnlySpan<Char>, Int32, String, Int32, Boolean, Boolean)

最大トークン数までのトークン ID に入力テキストをエンコードします。

(継承元 Tokenizer)
EncodeToIds(String, Boolean, Boolean, Boolean, Boolean)

入力テキストをトークン ID にエンコードします。

EncodeToIds(String, Boolean, Boolean, Int32, String, Int32, Boolean, Boolean)

最大トークン数までのトークン ID に入力テキストをエンコードします。

EncodeToIds(String, Boolean, Boolean)

入力テキストをトークン ID にエンコードします。

(継承元 Tokenizer)
EncodeToIds(String, Int32, String, Int32, Boolean, Boolean)

最大トークン数までのトークン ID に入力テキストをエンコードします。

<param name="text">エンコードするテキスト</param> (継承元 Tokenizer)
EncodeToIds(String, ReadOnlySpan<Char>, EncodeSettings)

入力テキストをトークン ID にエンコードします。

EncodeToTokens(ReadOnlySpan<Char>, String, Boolean, Boolean, Boolean, Boolean)

トークン、ID、およびオフセットの文字列値を使用して、入力テキストに EncodedTokenのリストをエンコードします。

EncodeToTokens(ReadOnlySpan<Char>, String, Boolean, Boolean)

入力テキストを EncodedTokenの一覧にエンコードします。

(継承元 Tokenizer)
EncodeToTokens(String, ReadOnlySpan<Char>, EncodeSettings)

入力テキストを EncodedTokenの一覧にエンコードします。

EncodeToTokens(String, String, Boolean, Boolean, Boolean, Boolean)

トークン、ID、およびオフセットの文字列値を使用して、入力テキストに EncodedTokenのリストをエンコードします。

EncodeToTokens(String, String, Boolean, Boolean)

入力テキストを EncodedTokenの一覧にエンコードします。

(継承元 Tokenizer)
GetIndexByTokenCount(ReadOnlySpan<Char>, Boolean, Boolean, Int32, String, Int32, Boolean, Boolean)

トークンの制限を超えることなく、テキスト内の先頭から最大エンコード容量のインデックスを検索します。

GetIndexByTokenCount(ReadOnlySpan<Char>, Int32, String, Int32, Boolean, Boolean)

トークンの制限を超えることなく、最大エンコード容量のインデックスを見つけます。

(継承元 Tokenizer)
GetIndexByTokenCount(String, Boolean, Boolean, Int32, String, Int32, Boolean, Boolean)

トークンの制限を超えることなく、テキスト内の先頭から最大エンコード容量のインデックスを検索します。

GetIndexByTokenCount(String, Int32, String, Int32, Boolean, Boolean)

トークンの制限を超えることなく、最大エンコード容量のインデックスを見つけます。

(継承元 Tokenizer)
GetIndexByTokenCount(String, ReadOnlySpan<Char>, EncodeSettings, Boolean, String, Int32)

トークンの制限を超えることなく、最大エンコード容量のインデックスを見つけます。

GetIndexByTokenCountFromEnd(ReadOnlySpan<Char>, Boolean, Boolean, Int32, Boolean, String, Int32)

トークンの制限を超えずに、テキスト内の末尾から最大エンコード容量のインデックスを検索します。

GetIndexByTokenCountFromEnd(ReadOnlySpan<Char>, Int32, String, Int32, Boolean, Boolean)

トークンの制限を超えることなく、最大エンコード容量のインデックスを見つけます。

(継承元 Tokenizer)
GetIndexByTokenCountFromEnd(String, Boolean, Boolean, Int32, Boolean, String, Int32)

トークンの制限を超えずに、テキスト内の末尾から最大エンコード容量のインデックスを検索します。

GetIndexByTokenCountFromEnd(String, Int32, String, Int32, Boolean, Boolean)

トークンの制限を超えることなく、最大エンコード容量のインデックスを見つけます。

(継承元 Tokenizer)

適用対象