संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: यूनिकोडट्रांसकोड:: Attrs
#include <string_ops.h>
यूनिकोडट्रांसकोड के लिए वैकल्पिक विशेषता सेटर।
सारांश
सार्वजनिक समारोह |
---|
Errors (StringPiece x) | इनपुट में अमान्य फ़ॉर्मेटिंग पाए जाने पर नीति प्रबंधन में त्रुटि। |
ReplaceControlCharacters (bool x) | C0 नियंत्रण वर्ण (00-1F) को replacement_char से बदलना है या नहीं। |
ReplacementChar (int64 x) | errors='replace' होने पर इनपुट में किसी भी अमान्य फ़ॉर्मेटिंग के स्थान पर प्रतिस्थापन वर्ण कोडपॉइंट का उपयोग किया जाना चाहिए। |
सार्वजनिक गुण
त्रुटियाँ_
StringPiece tensorflow::ops::UnicodeTranscode::Attrs::errors_ = "replace"
बदलें_नियंत्रण_अक्षर_
bool tensorflow::ops::UnicodeTranscode::Attrs::replace_control_characters_ = false
प्रतिस्थापन_चार_
int64 tensorflow::ops::UnicodeTranscode::Attrs::replacement_char_ = 65533
सार्वजनिक समारोह
त्रुटियाँ
TF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::Errors(
StringPiece x
)
इनपुट में अमान्य फ़ॉर्मेटिंग पाए जाने पर नीति प्रबंधन में त्रुटि।
'सख्त' का मान ऑपरेशन के कारण किसी भी अमान्य इनपुट फ़ॉर्मेटिंग पर InvalidArgument त्रुटि उत्पन्न करेगा। 'रिप्लेस' (डिफ़ॉल्ट) का मान ऑपरेशन को replacement_char
कोडपॉइंट के साथ इनपुट में किसी भी अमान्य फ़ॉर्मेटिंग को बदलने का कारण बनेगा। 'अनदेखा' का मान ऑपरेशन के कारण इनपुट में किसी भी अमान्य फ़ॉर्मेटिंग को छोड़ देगा और कोई संबंधित आउटपुट वर्ण उत्पन्न नहीं करेगा।
डिफ़ॉल्ट रूप से "प्रतिस्थापित करें"
ReplaceControlCharacters
TF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::ReplaceControlCharacters(
bool x
)
C0 नियंत्रण वर्ण (00-1F) को replacement_char
से बदलना है या नहीं।
डिफ़ॉल्ट ग़लत है.
डिफ़ॉल्ट से असत्य
रिप्लेसमेंटचार
TF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::ReplacementChar(
int64 x
)
errors='replace'
होने पर इनपुट में किसी भी अमान्य फ़ॉर्मेटिंग के स्थान पर प्रतिस्थापन वर्ण कोडपॉइंट का उपयोग किया जाना चाहिए।
किसी भी वैध यूनिकोड कोडपॉइंट का उपयोग किया जा सकता है। डिफ़ॉल्ट मान डिफ़ॉल्ट यूनिकोड प्रतिस्थापन वर्ण 0xFFFD या U+65533 है।)
ध्यान दें कि UTF-8 के लिए, 1 बाइट में व्यक्त होने वाले प्रतिस्थापन वर्ण, जैसे '', को पास करने से स्रोत के साथ स्ट्रिंग संरेखण सुरक्षित रहेगा क्योंकि अमान्य बाइट्स को 1-बाइट प्रतिस्थापन के साथ बदल दिया जाएगा। UTF-16-BE और UTF-16-LE के लिए, कोई भी 1 या 2 बाइट प्रतिस्थापन वर्ण स्रोत के साथ बाइट संरेखण को सुरक्षित रखेगा।
65533 पर डिफ़ॉल्ट
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],null,["# tensorflow::ops::UnicodeTranscode::Attrs Struct Reference\n\ntensorflow::ops::UnicodeTranscode::Attrs\n========================================\n\n`#include \u003cstring_ops.h\u003e`\n\nOptional attribute setters for [UnicodeTranscode](/versions/r2.2/api_docs/cc/class/tensorflow/ops/unicode-transcode#classtensorflow_1_1ops_1_1_unicode_transcode).\n\nSummary\n-------\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------------------------------------------|---------------|\n| [errors_](#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1abcd1383b9be66c3a3bb38f35eb35d7c8)` = \"replace\"` | `StringPiece` |\n| [replace_control_characters_](#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1a98f8a37849498e2da67eac2ad35642a2)` = false` | `bool` |\n| [replacement_char_](#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1afe5534f218249f3369c91e047af3775b)` = 65533` | `int64` |\n\n| ### Public functions ||\n|-----------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Errors](#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1ab1e6a46bf9d2cc08d188a8f65ce5af5f)`(StringPiece x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs) Error handling policy when there is invalid formatting found in the input. |\n| [ReplaceControlCharacters](#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1a14ef90d95676aea36bd25eb2589cf726)`(bool x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs) Whether to replace the C0 control characters (00-1F) with the `replacement_char`. |\n| [ReplacementChar](#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs_1aff6611b37bc42f8b41c1341a2588c7eb)`(int64 x)` | `TF_MUST_USE_RESULT `[Attrs](/versions/r2.2/api_docs/cc/struct/tensorflow/ops/unicode-transcode/attrs#structtensorflow_1_1ops_1_1_unicode_transcode_1_1_attrs) The replacement character codepoint to be used in place of any invalid formatting in the input when `errors='replace'`. |\n\nPublic attributes\n-----------------\n\n### errors_\n\n```scdoc\nStringPiece tensorflow::ops::UnicodeTranscode::Attrs::errors_ = \"replace\"\n``` \n\n### replace_control_characters_\n\n```scdoc\nbool tensorflow::ops::UnicodeTranscode::Attrs::replace_control_characters_ = false\n``` \n\n### replacement_char_\n\n```scdoc\nint64 tensorflow::ops::UnicodeTranscode::Attrs::replacement_char_ = 65533\n``` \n\nPublic functions\n----------------\n\n### Errors\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::Errors(\n StringPiece x\n)\n``` \nError handling policy when there is invalid formatting found in the input.\n\nThe value of 'strict' will cause the operation to produce a InvalidArgument error on any invalid input formatting. A value of 'replace' (the default) will cause the operation to replace any invalid formatting in the input with the `replacement_char` codepoint. A value of 'ignore' will cause the operation to skip any invalid formatting in the input and produce no corresponding output character.\n\nDefaults to \"replace\" \n\n### ReplaceControlCharacters\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::ReplaceControlCharacters(\n bool x\n)\n``` \nWhether to replace the C0 control characters (00-1F) with the `replacement_char`.\n\nDefault is false.\n\nDefaults to false \n\n### ReplacementChar\n\n```scdoc\nTF_MUST_USE_RESULT Attrs tensorflow::ops::UnicodeTranscode::Attrs::ReplacementChar(\n int64 x\n)\n``` \nThe replacement character codepoint to be used in place of any invalid formatting in the input when `errors='replace'`.\n\n[Any](/versions/r2.2/api_docs/cc/class/tensorflow/ops/any#classtensorflow_1_1ops_1_1_any) valid unicode codepoint may be used. The default value is the default unicode replacement character is 0xFFFD or U+65533.)\n\nNote that for UTF-8, passing a replacement character expressible in 1 byte, such as ' ', will preserve string alignment to the source since invalid bytes will be replaced with a 1-byte replacement. For UTF-16-BE and UTF-16-LE, any 1 or 2 byte replacement character will preserve byte alignment to the source.\n\nDefaults to 65533"]]