@Experimental public abstract class AnnotateText extends PTransform<PCollection<com.google.cloud.language.v1.Document>,PCollection<com.google.cloud.language.v1.AnnotateTextResponse>>
PTransform
using the Cloud AI Natural language processing capability. Takes an input
PCollection
of Document
s and converts them to AnnotateTextResponse
s.
It is possible to provide a language hint to the API. A AnnotateTextRequest.Features
object is required to configure
analysis types to be done on the data.
Modifier and Type | Class and Description |
---|---|
static class |
AnnotateText.Builder |
name, resourceHints
Constructor and Description |
---|
AnnotateText() |
Modifier and Type | Method and Description |
---|---|
PCollection<com.google.cloud.language.v1.AnnotateTextResponse> |
expand(PCollection<com.google.cloud.language.v1.Document> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
abstract com.google.cloud.language.v1.AnnotateTextRequest.Features |
features() |
abstract @Nullable java.lang.String |
languageHint() |
static AnnotateText.Builder |
newBuilder() |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validate
public abstract @Nullable java.lang.String languageHint()
public abstract com.google.cloud.language.v1.AnnotateTextRequest.Features features()
public static AnnotateText.Builder newBuilder()
public PCollection<com.google.cloud.language.v1.AnnotateTextResponse> expand(PCollection<com.google.cloud.language.v1.Document> input)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PCollection<com.google.cloud.language.v1.Document>,PCollection<com.google.cloud.language.v1.AnnotateTextResponse>>