tensorflow:: ops:: StringNGrams
#include <string_ops.h>不規則な文字列データからnグラムを作成します。
まとめ
この操作は、文字列のみを含む 1 つの不規則な次元を持つ不規則なテンソルを受け取り、その文字列の n グラムを最も内側の軸に沿って結合した 1 つの不規則な次元を持つ不規則なテンソルを出力します。
議論:
- スコープ:スコープオブジェクト
- data: nグラムを作成するための、不規則な文字列テンソルの値テンソル。1次元の文字列テンソルである必要があります。
- data_splits: nグラムを作成するための、不規則な文字列テンソルの分割テンソル。
- 区切り文字:トークンの要素間に挿入する文字列。区切り文字を使用しない場合は "" を使用します。
- ngram_widths: 作成するnグラムのサイズ。
- left_pad: ngramシーケンスの左側を埋めるために使用する文字列。pad_width != 0 の場合にのみ使用されます。
- right_pad: ngramシーケンスの右側を埋めるために使用する文字列。pad_width != 0 の場合にのみ使用されます。
- pad_width: 各シーケンスの両側に追加するパディング要素の数。この値に関わらず、パディングは「ngram_widths」-1を超えることはありません。pad_width
pad_width=-1の場合は、max(ngram_widths)-1個の要素を追加します。
返品:
コンストラクターとデストラクタ | |
|---|---|
StringNGrams (const :: tensorflow::Scope & scope, :: tensorflow::Input data, :: tensorflow::Input data_splits, StringPiece separator, const gtl::ArraySlice< int > & ngram_widths, StringPiece left_pad, StringPiece right_pad, int64 pad_width, bool preserve_short_sequences) |
公開属性 | |
|---|---|
ngrams | |
ngrams_splits | |
operation | |
公開属性
nグラム
::tensorflow::Output ngrams
ngram_splits
::tensorflow::Output ngrams_splits
手術
Operation operation
公的機能
ストリングングラム
StringNGrams( const ::tensorflow::Scope & scope, ::tensorflow::Input data, ::tensorflow::Input data_splits, StringPiece separator, const gtl::ArraySlice< int > & ngram_widths, StringPiece left_pad, StringPiece right_pad, int64 pad_width, bool preserve_short_sequences )