تينسورفلو :: العمليات :: StringNGrams
#include <string_ops.h>
ينشئ ngrams من بيانات سلسلة ممزقة.
ملخص
يقبل هذا المرجع موترًا خشنًا ذو بُعد واحد ممزق يحتوي على سلاسل فقط ويخرج موترًا خشنًا مع بُعد واحد ممزق يحتوي على ngrams من تلك السلسلة ، متصلة على طول المحور الداخلي.
الحجج:
- النطاق: كائن النطاق
- البيانات: موتر قيم موتر السلسلة الخشنة لجعل ngrams من. يجب أن يكون موتر سلسلة 1D.
- data_splits: موتر الانقسام في موتر السلسلة الممزقة لإخراج ngrams منه.
- الفاصل: السلسلة المطلوب إلحاقها بين عناصر الرمز المميز. استخدم "" لعدم وجود فاصل.
- ngram_widths: أحجام ngrams المراد إنشاؤها.
- left_pad: السلسلة التي سيتم استخدامها لتضخيم الجانب الأيسر من تسلسل ngram. تستخدم فقط إذا كان pad_width! = 0.
- right_pad: السلسلة المراد استخدامها لحشو الجانب الأيمن من تسلسل ngram. تستخدم فقط إذا كان pad_width! = 0.
- pad_width: عدد عناصر الحشو المراد إضافتها إلى كل جانب من كل تسلسل. لاحظ أن المساحة المتروكة لن تكون أبدًا أكبر من "ngram_widths" -1 بغض النظر عن هذه القيمة. إذا كانت
pad_width=-1
،pad_width=-1
بإضافة عناصرmax(ngram_widths)-1
.
عائدات:
-
Output
ngrams: موتر القيم من ngrams الناتج موتر ممزق. -
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) |
السمات العامة | |
---|---|
ngrams | |
ngrams_splits | |
operation |
السمات العامة
نانوغرام
::tensorflow::Output ngrams
ngrams_splits
::tensorflow::Output ngrams_splits
عملية
Operation operation
الوظائف العامة
StringNGrams
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 )
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-04-20 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"Translation issue"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"مشكلة في العيّنات / التعليمات البرمجية"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]