tensorflow:: عملیات:: StringNGrams
#include <string_ops.h>ngram ها را از داده های رشته ای ناهموار ایجاد می کند.
خلاصه
این تابع یک تانسور ناهموار با ۱ بُعد ناهموار که فقط شامل رشتهها است را میپذیرد و یک تانسور ناهموار با ۱ بُعد ناهموار که شامل ngramهایی از آن رشته است و در امتداد داخلیترین محور به هم متصل شدهاند، خروجی میدهد.
استدلالها:
- دامنه: یک شیء دامنه
- data: The values tensor of the ragged string tensor to make ngrams out of. Must be a 1D string tensor.
- data_splits: The splits tensor of the ragged string tensor to make ngrams out of.
- separator: The string to append between elements of the token. Use "" for no separator.
- ngram_widths: اندازه ngramهایی که باید ایجاد شوند.
- left_pad: The string to use to pad the left side of the ngram sequence. Only used if pad_width != 0.
- right_pad: The string to use to pad the right side of the ngram sequence. Only used if pad_width != 0.
- pad_width: تعداد عناصر padding که باید به هر طرف هر دنباله اضافه شوند. توجه داشته باشید که padding صرف نظر از این مقدار، هرگز بیشتر از 'ngram_widths'-1 نخواهد بود. اگر
pad_width=-1، آنگاهmax(ngram_widths)-1عنصر اضافه کنید.
بازده:
-
Outputngrams: The values tensor of the output ngrams ragged tensor. -
Outputngrams_splits: The splits tensor of the output ngrams ragged tensor.
سازندهها و مخربها | |
|---|---|
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 | |
ویژگیهای عمومی
انگرامها
::tensorflow::Output ngrams
ngrams_splits
::tensorflow::Output ngrams_splits
عملیات
Operation operation
کارکردهای عمومی
StringNGram ها
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 )
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2026-11-05 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2026-11-05 بهوقت ساعت هماهنگ جهانی."],[],[]]