#include <string_ops.h>
Creates ngrams from ragged string data.
This op accepts a ragged tensor with 1 ragged dimension containing only strings and outputs a ragged tensor with 1 ragged dimension containing ngrams of that string, joined along the innermost axis.
Arguments:
pad_width=-1
, then add max(ngram_widths)-1
elements.Returns:
Output
ngrams: The values tensor of the output ngrams ragged tensor.Output
ngrams_splits: The splits tensor of the output ngrams ragged tensor. Constructors and Destructors | |
---|---|
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) |
Public attributes | |
---|---|
ngrams | |
ngrams_splits | |
operation |
::tensorflow::Output ngrams
::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 )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/cc/class/tensorflow/ops/string-n-grams