সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
টেনসরফ্লো :: অপস:: স্ট্রিংএনগ্রাম
#include <string_ops.h>
রাগড স্ট্রিং ডেটা থেকে এনগ্রাম তৈরি করে।
সারাংশ
এই অপটি শুধুমাত্র স্ট্রিং সমন্বিত 1টি র্যাগড ডাইমেনশন সহ একটি র্যাগড টেনসর গ্রহণ করে এবং সেই স্ট্রিংটির এনগ্রাম সমন্বিত 1টি র্যাগড ডাইমেনশন সহ একটি র্যাগড টেনসর আউটপুট করে, যা সবচেয়ে ভিতরের অক্ষ বরাবর যুক্ত হয়।
যুক্তি:
- স্কোপ: একটি স্কোপ অবজেক্ট
- ডেটা: এনগ্রাম তৈরি করতে র্যাগড স্ট্রিং টেনসরের মান টেনসর। একটি 1D স্ট্রিং টেনসর হতে হবে।
- data_splits: রাগড স্ট্রিং টেনসরের স্প্লিট টেনসর যা থেকে এনগ্রাম তৈরি করা হয়।
- বিভাজক: টোকেনের উপাদানগুলির মধ্যে যোগ করার জন্য স্ট্রিং। কোন বিভাজকের জন্য "" ব্যবহার করুন।
- ngram_widths: ngrams এর আকার তৈরি করতে হবে।
- left_pad: এনগ্রাম সিকোয়েন্সের বাম দিকে প্যাড করার জন্য ব্যবহার করা স্ট্রিং। শুধুমাত্র pad_width != 0 হলেই ব্যবহৃত হয়।
- right_pad: এনগ্রাম সিকোয়েন্সের ডান দিকে প্যাড করার জন্য যে স্ট্রিং ব্যবহার করা হবে। শুধুমাত্র pad_width != 0 হলেই ব্যবহৃত হয়।
- pad_width: প্রতিটি সিকোয়েন্সের প্রতিটি পাশে যোগ করার জন্য প্যাডিং উপাদানের সংখ্যা। মনে রাখবেন যে প্যাডিং এই মান নির্বিশেষে 'ngram_widths'-1 এর চেয়ে বেশি হবে না। যদি
pad_width=-1
, তাহলে max(ngram_widths)-1
উপাদান যোগ করুন।
রিটার্ন:
-
Output
এনগ্রাম: আউটপুট এনগ্রামের র্যাগড টেনসরের মান টেনসর। -
Output
ngrams_splits: আউটপুট ngrams র্যাগড টেনসরের স্প্লিট টেনসর।
পাবলিক বৈশিষ্ট্য
পাবলিক ফাংশন
স্ট্রিংএনগ্রাম
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 সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-26 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-07-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# tensorflow::ops::StringNGrams Class Reference\n\ntensorflow::ops::StringNGrams\n=============================\n\n`#include \u003cstring_ops.h\u003e`\n\nCreates ngrams from ragged string data.\n\nSummary\n-------\n\nThis 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.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- data: The values tensor of the ragged string tensor to make ngrams out of. Must be a 1D string tensor.\n- data_splits: The splits tensor of the ragged string tensor to make ngrams out of.\n- separator: The string to append between elements of the token. Use \"\" for no separator.\n- ngram_widths: The sizes of the ngrams to create.\n- left_pad: The string to use to pad the left side of the ngram sequence. Only used if pad_width != 0.\n- right_pad: The string to use to pad the right side of the ngram sequence. Only used if pad_width != 0.\n- pad_width: The number of padding elements to add to each side of each sequence. Note that padding will never be greater than 'ngram_widths'-1 regardless of this value. If `pad_width=-1`, then add `max(ngram_widths)-1` elements.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) ngrams: The values tensor of the output ngrams ragged tensor.\n- [Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) ngrams_splits: The splits tensor of the output ngrams ragged tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [StringNGrams](#classtensorflow_1_1ops_1_1_string_n_grams_1a52a1f08705af6ba58d3607b809b3f835)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` data, ::`[tensorflow::Input](/versions/r2.0/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` data_splits, StringPiece separator, const gtl::ArraySlice\u003c int \u003e & ngram_widths, StringPiece left_pad, StringPiece right_pad, int64 pad_width, bool preserve_short_sequences)` ||\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [ngrams](#classtensorflow_1_1ops_1_1_string_n_grams_1a447bd501492adc42e453473dd818baf0) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [ngrams_splits](#classtensorflow_1_1ops_1_1_string_n_grams_1af326c6b4d4d0f53e7b7360546c807526) | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_string_n_grams_1a96bbeebe04843441f8b36c587ed4f1c9) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\nPublic attributes\n-----------------\n\n### ngrams\n\n```text\n::tensorflow::Output ngrams\n``` \n\n### ngrams_splits\n\n```scdoc\n::tensorflow::Output ngrams_splits\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### StringNGrams\n\n```gdscript\n StringNGrams(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input data,\n ::tensorflow::Input data_splits,\n StringPiece separator,\n const gtl::ArraySlice\u003c int \u003e & ngram_widths,\n StringPiece left_pad,\n StringPiece right_pad,\n int64 pad_width,\n bool preserve_short_sequences\n)\n```"]]