Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::ops::UnicodeScript
#include <string_ops.h>
Determine the script codes of a given tensor of Unicode integer code points.
Summary
This operation converts Unicode code points to script codes corresponding to each code point. Script codes correspond to International Components for Unicode (ICU) UScriptCode values.
See ICU project docs for more details on script codes.
For an example, see the unicode strings guide on unicode scripts.
Returns -1 (USCRIPT_INVALID_CODE) for invalid codepoints. Output shape will match input shape.
Examples:
tf.strings.unicode_script([1, 31, 38])
Args:
- scope: A Scope object
- input: A Tensor of int32 Unicode code points.
Returns:
Output
: A Tensor of int32 script codes corresponding to each input code point.
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
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. Some content is licensed under the numpy license.
Last updated 2021-11-15 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-11-15 UTC."],[],[],null,["# tensorflow::ops::UnicodeScript Class Reference\n\ntensorflow::ops::UnicodeScript\n==============================\n\n`#include \u003cstring_ops.h\u003e`\n\nDetermine the script codes of a given tensor of Unicode integer code points.\n\nSummary\n-------\n\nThis operation converts Unicode code points to script codes corresponding to each code point. Script codes correspond to International Components for Unicode (ICU) UScriptCode values.\n\nSee [ICU project docs](http://icu-project.org/apiref/icu4c/uscript_8h.html) for more details on script codes.\n\nFor an example, see the unicode strings guide on [unicode scripts](https://www.tensorflow.org/tutorials/load_data/unicode#representing_unicode).\n\nReturns -1 (USCRIPT_INVALID_CODE) for invalid codepoints. [Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) shape will match input shape.\n\nExamples:\n\ntf.strings.unicode_script(\\[1, 31, 38\\])\n\nArgs:\n\n- scope: A [Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- input: A [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of int32 Unicode code points.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A [Tensor](/api_docs/cc/class/tensorflow/tensor#classtensorflow_1_1_tensor) of int32 script codes corresponding to each input code point.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [UnicodeScript](#classtensorflow_1_1ops_1_1_unicode_script_1a3c2f38d3c9ff7884807dc6e6660d6224)`(const ::`[tensorflow::Scope](/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` input)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_unicode_script_1a6b62e38d971b7c2f49b7f46ca75a79e9) | [Operation](/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_unicode_script_1a3e6135cd756ada3ee51b37c8f879e0a1) | `::`[tensorflow::Output](/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_unicode_script_1a3b95cdc9894e77ef015829cf931510bc)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_unicode_script_1aa515662748bc0cb5a41ff152999c3c41)`() const ` | |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_unicode_script_1a7fb25478d3dbc1e89e0dce2dbdcf425f)`() const ` | |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### UnicodeScript\n\n```gdscript\n UnicodeScript(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input input\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]