com.johnsnowlabs.nlp.annotators.ner
PretrainedZeroShotMultiTask
Companion object PretrainedZeroShotMultiTask
class PretrainedZeroShotMultiTask extends AnnotatorModel[PretrainedZeroShotMultiTask] with ParamsAndFeaturesWritable with HasBatchedAnnotate[PretrainedZeroShotMultiTask] with InternalWriteOnnxModel with WriteSentencePieceModel with HasEngine with CheckLicense
Zero-shot multi-task information extraction.
Performs four extraction tasks simultaneously from a single document in a single forward pass:
- **Named entity extraction** — spans of text matching a given type
- **Relation extraction** — (head, tail) span pairs for a given relation type
- **Classification** — document-level or sentence-level label assignment
- **Structured extraction** — structured records with typed fields extracted from text
All tasks are defined via a compact :: DSL, described below, and can be combined freely.
Tasks are zero-shot: no fine-tuning is needed.
DSL syntax
Specifications use :: as a separator. Order of optional parts is flexible.
Entities
Each entry is a string: "name", "name::dtype", "name::description", or
"name::dtype::description" where dtype is "list" (default, multiple spans) or "str"
(single best span).
.setEntities(Array( "person", // list of persons "company::str", // single company "product::Names of products or services", // list with description "price::str::Monetary value including currency" // single with dtype and description ))
Relations
Each entry is a string: "relation_name" or "relation_name::description". The model
extracts (head, tail) span pairs for each relation type.
.setRelations(Array( "works_for", "located_in::The organization is physically located in the place" ))
Classifications
Each entry is a (taskSpec, Array[labelSpec]) tuple.
- Task spec:
"task_name"(single-label) or"task_name::multi"(multi-label) - Label spec:
"label"or"label::description"
.setClassifications(Array( ("sentiment", Array("positive", "negative", "neutral")), ("topics::multi", Array("finance::Financial content", "technology", "politics")) ))
Structures
Each entry is a (structureName, Array[fieldSpec]) tuple. Fields use: "field_name",
"field_name::dtype", "field_name::description", "field_name::dtype::description", or
"field_name::[choice1|choice2]" (forces dtype=str).
.setStructures(Array( ("product_info", Array( "name::str", "price::str::Price including currency symbol", "features::list", "availability::[in_stock|pre_order|sold_out]" )) ))
Output
All task results are returned in a single output column as Array[Annotation]:
- Entities →
annotatorType = "chunk",result= span text,metadatacontainsentity,confidence,sentence - Classifications →
annotatorType = "category",result= label,metadatacontainsconfidence,task,sentence - Relations →
annotatorType = "category",result= relation name,metadatacontainschunk1,chunk2,entity1,entity2,entity1_begin,entity1_end,entity2_begin,entity2_end,chunk1_confidence,chunk2_confidence,sentence(compatible with com.johnsnowlabs.nlp.annotators.re.RelationExtractionDLModel output) - Structures →
annotatorType = "struct",result= structure name,metadatacontains one key per field (value is JSON-encoded: object forstrfields, array forlistfields) plusinstance_idxandsentence
Example
val zeroShot = PretrainedZeroShotMultiTask.pretrained() .setInputCols("document") .setOutputCol("extractions") .setEntities(Array("person", "company::str", "product::List of products")) .setClassifications(Array(("sentiment", Array("positive", "negative", "neutral")))) .setRelations(Array("works_for", "founded")) .setStructures(Array( ("invoice", Array("vendor::str", "amount::str", "items::list")))) .setEntityThreshold(0.5f) .setRelationThreshold(0.6f)
- Grouped
- Alphabetic
- By Inheritance
- PretrainedZeroShotMultiTask
- CheckLicense
- HasEngine
- WriteSentencePieceModel
- InternalWriteOnnxModel
- HasBatchedAnnotate
- AnnotatorModel
- CanBeLazy
- RawAnnotator
- HasOutputAnnotationCol
- HasInputAnnotationCols
- HasOutputAnnotatorType
- ParamsAndFeaturesWritable
- HasFeatures
- DefaultParamsWritable
- MLWritable
- Model
- Transformer
- PipelineStage
- Logging
- Params
- Serializable
- Serializable
- Identifiable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Type Members
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
$[T](param: Param[T]): T
- Attributes
- protected
- Definition Classes
- Params
-
def
$$[T](feature: StructFeature[T]): T
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
$$[K, V](feature: MapFeature[K, V]): Map[K, V]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
$$[T](feature: SetFeature[T]): Set[T]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
$$[T](feature: ArrayFeature[T]): Array[T]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
_transform(dataset: Dataset[_], recursivePipeline: Option[PipelineModel]): DataFrame
- Attributes
- protected
- Definition Classes
- AnnotatorModel
-
def
afterAnnotate(dataset: DataFrame): DataFrame
- Attributes
- protected
- Definition Classes
- AnnotatorModel
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
batchAnnotate(batchedAnnotations: Seq[Array[Annotation]]): Seq[Seq[Annotation]]
- Definition Classes
- PretrainedZeroShotMultiTask → HasBatchedAnnotate
-
def
batchProcess(rows: Iterator[_]): Iterator[Row]
- Definition Classes
- HasBatchedAnnotate
-
val
batchSize: IntParam
- Definition Classes
- HasBatchedAnnotate
-
def
beforeAnnotate(dataset: Dataset[_]): Dataset[_]
- Attributes
- protected
- Definition Classes
- AnnotatorModel
-
final
def
checkSchema(schema: StructType, inputAnnotatorType: String): Boolean
- Attributes
- protected
- Definition Classes
- HasInputAnnotationCols
-
def
checkValidEnvironment(spark: Option[SparkSession], scopes: Seq[String], metadata: Option[Map[String, Value]]): Unit
- Definition Classes
- CheckLicense
-
def
checkValidScope(scope: String): Unit
- Definition Classes
- CheckLicense
-
def
checkValidScopeAndEnvironment(scope: String, spark: Option[SparkSession], checkLp: Boolean, metadata: Option[Map[String, Value]]): Unit
- Definition Classes
- CheckLicense
-
def
checkValidScopesAndEnvironment(scopes: Seq[String], spark: Option[SparkSession], checkLp: Boolean, metadata: Option[Map[String, Value]]): Unit
- Definition Classes
- CheckLicense
- val classificationThreshold: FloatParam
-
val
classifications: Param[Array[(String, Array[String])]]
Classification tasks in DSL format.
Classification tasks in DSL format. Each entry defines one labelling task.
Format:
Array[(taskSpec, Array[labelSpec])]taskSpec—"task_name"for single-label or"task_name::multi"for multi-labellabelSpec—"label"or"label::description"for each candidate label
For single-label tasks the model returns the highest-scoring label above the threshold. For multi-label tasks all labels above the threshold are returned.
Examples:
("sentiment", Array("positive", "negative", "neutral")) ("sentiment::multi", Array("positive::Happy tone", "negative::Sad tone")) ("topic::multi", Array("finance", "technology::Tech products and companies", "politics"))
-
final
def
clear(param: Param[_]): PretrainedZeroShotMultiTask.this.type
- Definition Classes
- Params
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
copy(extra: ParamMap): PretrainedZeroShotMultiTask
- Definition Classes
- RawAnnotator → Model → Transformer → PipelineStage → Params
-
def
copyValues[T <: Params](to: T, extra: ParamMap): T
- Attributes
- protected
- Definition Classes
- Params
-
final
def
defaultCopy[T <: Params](extra: ParamMap): T
- Attributes
- protected
- Definition Classes
- Params
-
val
engine: Param[String]
- Definition Classes
- HasEngine
-
val
entities: StringArrayParam
Entity specifications in DSL format.
Entity specifications in DSL format. Each string describes one entity type to extract.
Format:
"name","name::dtype","name::description", or"name::dtype::description".name— entity type label (used as theentitymetadata key in output annotations)dtype—"list"(default) to extract all matching spans, or"str"to extract only the single highest-confidence spandescription— free-text hint sent to the model to guide extraction
Examples:
"person" // all person spans, no description "company::str" // single best company span "product::Names of products or services" // all product spans with description "price::str::Monetary value with currency" // single span, dtype before description
- val entityThreshold: FloatParam
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
explainParam(param: Param[_]): String
- Definition Classes
- Params
-
def
explainParams(): String
- Definition Classes
- Params
-
final
val
extraInputCols: StringArrayParam
- Attributes
- protected
- Definition Classes
- HasInputAnnotationCols
-
def
extraValidate(structType: StructType): Boolean
- Attributes
- protected
- Definition Classes
- RawAnnotator
-
def
extraValidateMsg: String
- Attributes
- protected
- Definition Classes
- RawAnnotator
-
final
def
extractParamMap(): ParamMap
- Definition Classes
- Params
-
final
def
extractParamMap(extra: ParamMap): ParamMap
- Definition Classes
- Params
-
val
features: ArrayBuffer[Feature[_, _, _]]
- Definition Classes
- HasFeatures
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get[T](feature: StructFeature[T]): Option[T]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
get[T](feature: SetFeature[T]): Option[Set[T]]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
get[T](feature: ArrayFeature[T]): Option[Array[T]]
- Attributes
- protected
- Definition Classes
- HasFeatures
-
final
def
get[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
def
getBatchSize: Int
- Definition Classes
- HasBatchedAnnotate
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getClassificationThreshold: Float
- def getClassifications: Array[(String, Array[String])]
-
def
getClassificationsAsJava: List[List[AnyRef]]
Java/Python-friendly getter: returns classifications as nested Java lists for Py4J.
-
final
def
getDefault[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
def
getEngine: String
- Definition Classes
- HasEngine
- def getEntities: Array[String]
- def getEntityThreshold: Float
-
def
getInputCols: Array[String]
- Definition Classes
- HasInputAnnotationCols
-
def
getLazyAnnotator: Boolean
- Definition Classes
- CanBeLazy
-
final
def
getOrDefault[T](param: Param[T]): T
- Definition Classes
- Params
-
final
def
getOutputCol: String
- Definition Classes
- HasOutputAnnotationCol
-
def
getParam(paramName: String): Param[Any]
- Definition Classes
- Params
- def getRelationThreshold: Float
- def getRelations: Array[String]
- def getStructureThreshold: Float
- def getStructures: Array[(String, Array[String])]
-
def
getStructuresAsJava: List[List[AnyRef]]
Java/Python-friendly getter: returns structures as nested Java lists for Py4J.
-
final
def
hasDefault[T](param: Param[T]): Boolean
- Definition Classes
- Params
-
def
hasParam(paramName: String): Boolean
- Definition Classes
- Params
-
def
hasParent: Boolean
- Definition Classes
- Model
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
val
inputAnnotatorTypes: Array[String]
Input Annotator Types: DOCUMENT
Input Annotator Types: DOCUMENT
- Definition Classes
- PretrainedZeroShotMultiTask → HasInputAnnotationCols
-
final
val
inputCols: StringArrayParam
- Attributes
- protected
- Definition Classes
- HasInputAnnotationCols
-
final
def
isDefined(param: Param[_]): Boolean
- Definition Classes
- Params
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
isSet(param: Param[_]): Boolean
- Definition Classes
- Params
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
val
lazyAnnotator: BooleanParam
- Definition Classes
- CanBeLazy
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
msgHelper(schema: StructType): String
- Attributes
- protected
- Definition Classes
- HasInputAnnotationCols
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onWrite(path: String, spark: SparkSession): Unit
- Definition Classes
- PretrainedZeroShotMultiTask → ParamsAndFeaturesWritable
-
val
optionalInputAnnotatorTypes: Array[String]
- Definition Classes
- HasInputAnnotationCols
-
val
outputAnnotatorType: AnnotatorType
Output Annotator Types: NAMED_ENTITY
Output Annotator Types: NAMED_ENTITY
- Definition Classes
- PretrainedZeroShotMultiTask → HasOutputAnnotatorType
-
final
val
outputCol: Param[String]
- Attributes
- protected
- Definition Classes
- HasOutputAnnotationCol
-
lazy val
params: Array[Param[_]]
- Definition Classes
- Params
-
var
parent: Estimator[PretrainedZeroShotMultiTask]
- Definition Classes
- Model
- val relationThreshold: FloatParam
-
val
relations: StringArrayParam
Relation specifications in DSL format.
Relation specifications in DSL format. Each string defines one relation type to extract.
Format:
"relation_name"or"relation_name::description".The model extracts (head, tail) span pairs. Output annotations use
annotatorType = "category"with the same metadata layout as com.johnsnowlabs.nlp.annotators.re.RelationExtractionDLModel:chunk1,chunk2,entity1,entity2,entity1_begin,entity1_end,entity2_begin,entity2_end,chunk1_confidence,chunk2_confidence.Examples:
"works_for" "located_in::The organization is physically located in the place" "founded::Founding relationship between a person and an organization"
-
def
save(path: String): Unit
- Definition Classes
- MLWritable
- Annotations
- @Since( "1.6.0" ) @throws( ... )
-
def
set[T](feature: StructFeature[T], value: T): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[K, V](feature: MapFeature[K, V], value: Map[K, V]): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[T](feature: SetFeature[T], value: Set[T]): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
set[T](feature: ArrayFeature[T], value: Array[T]): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
final
def
set(paramPair: ParamPair[_]): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
set(param: String, value: Any): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
set[T](param: Param[T], value: T): PretrainedZeroShotMultiTask.this.type
- Definition Classes
- Params
-
def
setBatchSize(size: Int): PretrainedZeroShotMultiTask.this.type
- Definition Classes
- HasBatchedAnnotate
-
def
setClassificationThreshold(value: Float): PretrainedZeroShotMultiTask.this.type
Set minimum confidence threshold for classification (default: 0.5).
Set minimum confidence threshold for classification (default: 0.5).
For single-label tasks, the best label is always returned regardless of threshold. For multi-label tasks, only labels with confidence ≥ threshold are included; if none qualify the best label is returned as a fallback.
-
def
setClassifications(names: List[String], labelsPerTask: List[List[String]]): PretrainedZeroShotMultiTask.this.type
Java/Python-friendly overload: accepts two parallel lists (task names and per-task label lists) as passed by Py4J from Python.
- def setClassifications(classifications: Array[(String, Array[String])]): PretrainedZeroShotMultiTask.this.type
-
def
setDefault[T](feature: StructFeature[T], value: () ⇒ T): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
def
setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- HasFeatures
-
final
def
setDefault(paramPairs: ParamPair[_]*): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected
- Definition Classes
- Params
-
final
def
setDefault[T](param: Param[T], value: T): PretrainedZeroShotMultiTask.this.type
- Attributes
- protected[org.apache.spark.ml]
- Definition Classes
- Params
- def setEntities(entities: Array[String]): PretrainedZeroShotMultiTask.this.type
-
def
setEntityThreshold(value: Float): PretrainedZeroShotMultiTask.this.type
Set minimum confidence threshold for entity extraction (default: 0.5).
Set minimum confidence threshold for entity extraction (default: 0.5).
Spans with a confidence score below this value are discarded. Applies uniformly to all entity types unless overridden per-type via schema metadata.
-
def
setExtraInputCols(value: Array[String]): PretrainedZeroShotMultiTask.this.type
- Definition Classes
- HasInputAnnotationCols
-
final
def
setInputCols(value: String*): PretrainedZeroShotMultiTask.this.type
- Definition Classes
- HasInputAnnotationCols
-
def
setInputCols(value: Array[String]): PretrainedZeroShotMultiTask.this.type
- Definition Classes
- HasInputAnnotationCols
-
def
setLazyAnnotator(value: Boolean): PretrainedZeroShotMultiTask.this.type
- Definition Classes
- CanBeLazy
- def setModelIfNotSet(spark: SparkSession, wrappers: Gliner2Wrappers, config: Gliner2Config = Gliner2Config()): PretrainedZeroShotMultiTask
-
final
def
setOutputCol(value: String): PretrainedZeroShotMultiTask.this.type
- Definition Classes
- HasOutputAnnotationCol
-
def
setParent(parent: Estimator[PretrainedZeroShotMultiTask]): PretrainedZeroShotMultiTask
- Definition Classes
- Model
-
def
setRelationThreshold(value: Float): PretrainedZeroShotMultiTask.this.type
Set minimum confidence threshold for relation extraction (default: 0.5).
Set minimum confidence threshold for relation extraction (default: 0.5).
Both the head and tail spans must meet this threshold for a relation instance to be emitted.
- def setRelations(relations: Array[String]): PretrainedZeroShotMultiTask.this.type
-
def
setStructureThreshold(value: Float): PretrainedZeroShotMultiTask.this.type
Set minimum confidence threshold for structure field extraction (default: 0.5).
Set minimum confidence threshold for structure field extraction (default: 0.5).
Applied to each field independently. Fields whose best span falls below the threshold are omitted from the instance map. Instances with no qualifying fields are discarded entirely.
-
def
setStructures(names: List[String], fieldsPerStructure: List[List[String]]): PretrainedZeroShotMultiTask.this.type
Java/Python-friendly overload: accepts two parallel lists (structure names and per-structure field-spec lists) as passed by Py4J from Python.
- def setStructures(structures: Array[(String, Array[String])]): PretrainedZeroShotMultiTask.this.type
- val structureThreshold: FloatParam
-
val
structures: Param[Array[(String, Array[String])]]
Structure specifications in DSL format.
Structure specifications in DSL format. Each entry defines one structured record type.
Format:
Array[(structureName, Array[fieldSpec])]structureName— name of the structure (becomes theresultof output annotations)fieldSpec— one of:"field_name"— list field, no constraint"field_name::str"— single-value span field"field_name::list"— multi-value span field (default)"field_name::description"— list field with description hint"field_name::str::description"— single-value with description"field_name::[choice1|choice2|choice3]"— classification field restricted to listed values (forcesdtype=str; separate choices with|)"field_name::[choice1|choice2]::description"— classification field with description
Each extracted structure instance is emitted as one
AnnotationwithannotatorType = "struct". Themetadatamap contains one key per field whose value is a JSON-encoded string:strspan field →{"text":"...","confidence":0.9,"start":0,"end":5}listspan field →[{"text":"...","confidence":0.9,"start":0,"end":5},...]strclassification field →{"text":"choice","confidence":0.9}listclassification field →[{"text":"choice","confidence":0.9},...]- Fields with no match are omitted from the map.
Examples:
("product_info", Array( "name::str", "price::str::Price including currency symbol", "features::list", "availability::[in_stock|pre_order|sold_out]" )) ("person", Array("name::str::Full name", "title::str", "organization::str"))
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Identifiable → AnyRef → Any
-
final
def
transform(dataset: Dataset[_]): DataFrame
- Definition Classes
- AnnotatorModel → Transformer
-
def
transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
- Definition Classes
- Transformer
- Annotations
- @Since( "2.0.0" )
-
def
transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
- Definition Classes
- Transformer
- Annotations
- @Since( "2.0.0" ) @varargs()
-
final
def
transformSchema(schema: StructType): StructType
- Definition Classes
- RawAnnotator → PipelineStage
-
def
transformSchema(schema: StructType, logging: Boolean): StructType
- Attributes
- protected
- Definition Classes
- PipelineStage
- Annotations
- @DeveloperApi()
-
val
uid: String
- Definition Classes
- PretrainedZeroShotMultiTask → Identifiable
-
def
validate(schema: StructType): Boolean
- Attributes
- protected
- Definition Classes
- RawAnnotator
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
wrapColumnMetadata(col: Column): Column
- Attributes
- protected
- Definition Classes
- RawAnnotator
-
def
write: MLWriter
- Definition Classes
- ParamsAndFeaturesWritable → DefaultParamsWritable → MLWritable
-
def
writeOnnxModel(path: String, spark: SparkSession, onnxWrapper: InternalOnnxWrapper, suffix: String, fileName: String, encrypt: Boolean): Unit
- Definition Classes
- InternalWriteOnnxModel
-
def
writeOnnxModel(path: String, spark: SparkSession, onnxWrapper: InternalOnnxWrapper, suffix: String, fileName: String): Unit
- Definition Classes
- InternalWriteOnnxModel
-
def
writeOnnxModels(path: String, spark: SparkSession, onnxWrappersWithNames: Seq[(InternalOnnxWrapper, String)], suffix: String, encrypt: Boolean = false): Unit
- Definition Classes
- InternalWriteOnnxModel
-
def
writeOnnxModels(path: String, spark: SparkSession, onnxWrappersWithNames: Seq[(InternalOnnxWrapper, String)], suffix: String): Unit
- Definition Classes
- InternalWriteOnnxModel
-
def
writeSentencePieceModel(path: String, spark: SparkSession, spp: SentencePieceWrapper, suffix: String, filename: String): Unit
- Definition Classes
- WriteSentencePieceModel