Loading TOC...

ort.string

ort.string(
   content as Array,
   shape as Array
) as ort.value

Summary

Creates a string tensor.

Parameters
content An array of xs:string denoting the flattened content of the string tensor.
shape An array of xs:long denoting the shape of the string tensor.

Example

  ort.string(["hello", " ", "world", "this is", "", " an example!"], [2,3])
  =>
  OrtValue(Shape:[2, 3], Type: STRING)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.