public final class StringsOps
extends java.lang.Object
strings operations to a Graph| Modifier and Type | Method | Description |
|---|---|---|
Join |
join(java.lang.Iterable<Operand<java.lang.String>> inputs,
Join.Options... options) |
Adds an
Join operation to the graph |
ReduceJoin |
reduceJoin(Operand<java.lang.String> inputs,
Operand<java.lang.Integer> reductionIndices,
ReduceJoin.Options... options) |
Adds an
ReduceJoin operation to the graph |
RegexFullMatch |
regexFullMatch(Operand<java.lang.String> input,
Operand<java.lang.String> pattern) |
Adds an
RegexFullMatch operation to the graph |
RegexReplace |
regexReplace(Operand<java.lang.String> input,
Operand<java.lang.String> pattern,
Operand<java.lang.String> rewrite,
RegexReplace.Options... options) |
Adds an
RegexReplace operation to the graph |
StringFormat |
stringFormat(java.lang.Iterable<Operand<?>> inputs,
StringFormat.Options... options) |
Adds an
StringFormat operation to the graph |
StringLength |
stringLength(Operand<java.lang.String> input,
StringLength.Options... options) |
Adds an
StringLength operation to the graph |
StringSplit |
stringSplit(Operand<java.lang.String> input,
Operand<java.lang.String> sep,
StringSplit.Options... options) |
Adds an
StringSplit operation to the graph |
Strip |
strip(Operand<java.lang.String> input) |
Adds an
Strip operation to the graph |
<T extends java.lang.Number> |
substr(Operand<java.lang.String> input,
Operand<T> pos,
Operand<T> len,
Substr.Options... options) |
Adds an
Substr operation to the graph |
ToHashBucket |
toHashBucket(Operand<java.lang.String> stringTensor,
java.lang.Long numBuckets) |
Adds an
ToHashBucket operation to the graph |
ToHashBucketFast |
toHashBucketFast(Operand<java.lang.String> input,
java.lang.Long numBuckets) |
Adds an
ToHashBucketFast operation to the graph |
ToHashBucketStrong |
toHashBucketStrong(Operand<java.lang.String> input,
java.lang.Long numBuckets,
java.util.List<java.lang.Long> key) |
Adds an
ToHashBucketStrong operation to the graph |
ToNumber<java.lang.Float> |
toNumber(Operand<java.lang.String> stringTensor) |
Adds an
ToNumber operation to the graph |
<T extends java.lang.Number> |
toNumber(Operand<java.lang.String> stringTensor,
java.lang.Class<T> outType) |
Adds an
ToNumber operation to the graph |
UnicodeScript |
unicodeScript(Operand<java.lang.Integer> input) |
Adds an
UnicodeScript operation to the graph |
UnicodeTranscode |
unicodeTranscode(Operand<java.lang.String> input,
java.lang.String inputEncoding,
java.lang.String outputEncoding,
UnicodeTranscode.Options... options) |
Adds an
UnicodeTranscode operation to the graph |
public StringLength stringLength(Operand<java.lang.String> input, StringLength.Options... options)
StringLength operation to the graphinput - The string for which to compute the length.options - carries optional attributes valuesStringLengthpublic RegexFullMatch regexFullMatch(Operand<java.lang.String> input, Operand<java.lang.String> pattern)
RegexFullMatch operation to the graphinput - A string tensor of the text to be processed.pattern - A scalar string tensor containing the regular expression to match the input.RegexFullMatchpublic <T extends java.lang.Number> ToNumber<T> toNumber(Operand<java.lang.String> stringTensor, java.lang.Class<T> outType)
ToNumber operation to the graphstringTensor - outType - The numeric type to interpret each string in `string_tensor` as.ToNumberpublic Strip strip(Operand<java.lang.String> input)
Strip operation to the graphinput - A string `Tensor` of any shape.Strippublic ReduceJoin reduceJoin(Operand<java.lang.String> inputs, Operand<java.lang.Integer> reductionIndices, ReduceJoin.Options... options)
ReduceJoin operation to the graphinputs - The input to be joined. All reduced indices must have non-zero size.reductionIndices - The dimensions to reduce over. Dimensions are reduced in theoptions - carries optional attributes valuesReduceJoinpublic UnicodeScript unicodeScript(Operand<java.lang.Integer> input)
UnicodeScript operation to the graphinput - A Tensor of int32 Unicode code points.UnicodeScriptpublic <T extends java.lang.Number> Substr substr(Operand<java.lang.String> input, Operand<T> pos, Operand<T> len, Substr.Options... options)
Substr operation to the graphinput - Tensor of stringspos - Scalar defining the position of first character in each substringlen - Scalar defining the number of characters to include in each substringoptions - carries optional attributes valuesSubstrpublic RegexReplace regexReplace(Operand<java.lang.String> input, Operand<java.lang.String> pattern, Operand<java.lang.String> rewrite, RegexReplace.Options... options)
RegexReplace operation to the graphinput - The text to be processed.pattern - The regular expression to match the input.rewrite - The rewrite to be applied to the matched expresion.options - carries optional attributes valuesRegexReplacepublic ToNumber<java.lang.Float> toNumber(Operand<java.lang.String> stringTensor)
ToNumber operation to the graphstringTensor - ToNumberpublic ToHashBucketFast toHashBucketFast(Operand<java.lang.String> input, java.lang.Long numBuckets)
ToHashBucketFast operation to the graphinput - The strings to assign a hash bucket.numBuckets - The number of buckets.ToHashBucketFastpublic UnicodeTranscode unicodeTranscode(Operand<java.lang.String> input, java.lang.String inputEncoding, java.lang.String outputEncoding, UnicodeTranscode.Options... options)
UnicodeTranscode operation to the graphinput - The text to be processed. Can have any shape.inputEncoding - Text encoding of the input strings. This is any of the encodings supportedoutputEncoding - The unicode encoding to use in the output. Must be one ofoptions - carries optional attributes valuesUnicodeTranscodepublic StringSplit stringSplit(Operand<java.lang.String> input, Operand<java.lang.String> sep, StringSplit.Options... options)
StringSplit operation to the graphinput - `1-D` string `Tensor`, the strings to split.sep - `0-D` string `Tensor`, the delimiter character.options - carries optional attributes valuesStringSplitpublic Join join(java.lang.Iterable<Operand<java.lang.String>> inputs, Join.Options... options)
Join operation to the graphinputs - A list of string tensors. The tensors must all have the same shape,options - carries optional attributes valuesJoinpublic ToHashBucket toHashBucket(Operand<java.lang.String> stringTensor, java.lang.Long numBuckets)
ToHashBucket operation to the graphstringTensor - numBuckets - The number of buckets.ToHashBucketpublic ToHashBucketStrong toHashBucketStrong(Operand<java.lang.String> input, java.lang.Long numBuckets, java.util.List<java.lang.Long> key)
ToHashBucketStrong operation to the graphinput - The strings to assign a hash bucket.numBuckets - The number of buckets.key - The key for the keyed hash function passed as a list of two uint64ToHashBucketStrongpublic StringFormat stringFormat(java.lang.Iterable<Operand<?>> inputs, StringFormat.Options... options)
StringFormat operation to the graphinputs - The list of tensors to format into the placeholder string.options - carries optional attributes valuesStringFormat