# tf.strings.unicode_script

<br />

Determine the script codes of a given tensor of Unicode integer code points.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.strings.unicode_script`](https://www.tensorflow.org/api_docs/python/tf/strings/unicode_script)

<br />

    tf.strings.unicode_script(
        input: Annotated[Any, _atypes.Int32], name=None
    ) -> Annotated[Any, _atypes.Int32]

### Used in the notebooks

| Used in the guide |
|---|
| - [Unicode strings](https://www.tensorflow.org/text/guide/unicode) |

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](http://icu-project.org/apiref/icu4c/uscript_8h.html)
for more details on script codes.

For an example, see the unicode strings guide on [unicode scripts](https://www.tensorflow.org/tutorials/load_data/unicode#representing_unicode).

Returns -1 (USCRIPT_INVALID_CODE) for invalid codepoints. Output shape will
match input shape.

#### Examples:

    tf.strings.unicode_script([1, 31, 38])
    <tf.Tensor: shape=(3,), dtype=int32, numpy=array([0, 0, 0], dtype=int32)>

<br />

<br />

<br />

| ## Args ||
|---|---|
| `input` | A `Tensor` of type `int32`. A Tensor of int32 Unicode code points. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `int32`. ||

<br />