컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: 유니코드트랜스코드:: 속성
#include <string_ops.h>
UnicodeTranscode 에 대한 선택적 속성 설정자입니다.
요약
공공 기능 |
---|
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
)
입력에 잘못된 형식이 있는 경우 오류 처리 정책입니다.
'strict' 값을 사용하면 잘못된 입력 형식에 대해 작업에서 InvalidArgument 오류가 생성됩니다. 'replace' 값(기본값)을 사용하면 작업이 입력의 잘못된 형식을 replacement_char
코드 포인트로 대체합니다. 'ignore' 값을 사용하면 작업이 입력에서 잘못된 형식을 건너뛰고 해당 출력 문자가 생성되지 않습니다.
기본값은 "교체"입니다.
ControlCharacters 교체
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 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 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"]]