class EntityRulerModel extends AnnotatorModel[EntityRulerModel] with HasSimpleAnnotate[EntityRulerModel] with HasStorageModel
Instantiated model of the EntityRulerApproach. For usage and examples see the documentation of the main class.
- Grouped
- Alphabetic
- By Inheritance
- EntityRulerModel
- HasStorageModel
- HasStorageOptions
- HasStorageReader
- HasCaseSensitiveProperties
- HasStorageRef
- HasSimpleAnnotate
- 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
Parameters
A list of (hyper-)parameter keys this annotator can take. Users can set and get the parameter values through setters and getters, respectively.
-
val
caseSensitive: BooleanParam
Whether to ignore case in index lookups (Default depends on model)
Whether to ignore case in index lookups (Default depends on model)
- Definition Classes
- HasCaseSensitiveProperties
-
val
storageRef: Param[String]
Unique identifier for storage (Default:
this.uid
)Unique identifier for storage (Default:
this.uid
)- Definition Classes
- HasStorageRef
Members
-
type
AnnotatorType = String
- Definition Classes
- HasOutputAnnotatorType
-
def
_transform(dataset: Dataset[_], recursivePipeline: Option[PipelineModel]): DataFrame
- Definition Classes
- EntityRulerModel → AnnotatorModel
-
def
annotate(annotations: Seq[Annotation]): Seq[Annotation]
takes a document and annotations and produces new annotations of this annotator's annotation type
takes a document and annotations and produces new annotations of this annotator's annotation type
- annotations
Annotations that correspond to inputAnnotationCols generated by previous annotators if any
- returns
any number of annotations processed for every input annotation. Not necessary one to one relationship
- Definition Classes
- EntityRulerModel → HasSimpleAnnotate
-
def
beforeAnnotate(dataset: Dataset[_]): Dataset[_]
- Definition Classes
- EntityRulerModel → AnnotatorModel
-
final
def
clear(param: Param[_]): EntityRulerModel.this.type
- Definition Classes
- Params
-
def
copy(extra: ParamMap): EntityRulerModel
requirement for annotators copies
requirement for annotators copies
- Definition Classes
- RawAnnotator → Model → Transformer → PipelineStage → Params
-
def
createDatabaseConnection(database: Name): RocksDBConnection
- Definition Classes
- HasStorageRef
-
def
deserializeStorage(path: String, spark: SparkSession): Unit
- Definition Classes
- EntityRulerModel → HasStorageModel
-
def
dfAnnotate: UserDefinedFunction
Wraps annotate to happen inside SparkSQL user defined functions in order to act with org.apache.spark.sql.Column
Wraps annotate to happen inside SparkSQL user defined functions in order to act with org.apache.spark.sql.Column
- returns
udf function to be applied to inputCols using this annotator's annotate function as part of ML transformation
- Definition Classes
- HasSimpleAnnotate
-
val
enableInMemoryStorage: BooleanParam
- Definition Classes
- HasStorageOptions
-
def
explainParam(param: Param[_]): String
- Definition Classes
- Params
-
def
explainParams(): String
- Definition Classes
- Params
-
final
def
extractParamMap(): ParamMap
- Definition Classes
- Params
-
final
def
extractParamMap(extra: ParamMap): ParamMap
- Definition Classes
- Params
-
val
features: ArrayBuffer[Feature[_, _, _]]
- Definition Classes
- HasFeatures
-
final
def
get[T](param: Param[T]): Option[T]
- Definition Classes
- Params
- def getAutomatonModelIfNotSet: Option[AhoCorasickAutomaton]
-
final
def
getDefault[T](param: Param[T]): Option[T]
- Definition Classes
- Params
-
def
getEnableInMemoryStorage: Boolean
- Definition Classes
- HasStorageOptions
-
def
getIncludeStorage: Boolean
- Definition Classes
- HasStorageOptions
-
def
getInputCols: Array[String]
- returns
input annotations columns currently used
- Definition Classes
- HasInputAnnotationCols
-
def
getLazyAnnotator: Boolean
- Definition Classes
- CanBeLazy
-
final
def
getOrDefault[T](param: Param[T]): T
- Definition Classes
- Params
-
final
def
getOutputCol: String
Gets annotation column name going to generate
Gets annotation column name going to generate
- Definition Classes
- HasOutputAnnotationCol
-
def
getParam(paramName: String): Param[Any]
- Definition Classes
- Params
-
def
getStorageRef: String
- Definition Classes
- HasStorageRef
-
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
-
val
includeStorage: BooleanParam
- Definition Classes
- HasStorageOptions
-
val
inputAnnotatorTypes: Array[String]
Annotator reference id.
Annotator reference id. Used to identify elements in metadata or to refer to this annotator type
- Definition Classes
- EntityRulerModel → HasInputAnnotationCols
-
final
def
isDefined(param: Param[_]): Boolean
- Definition Classes
- Params
-
final
def
isSet(param: Param[_]): Boolean
- Definition Classes
- Params
-
val
lazyAnnotator: BooleanParam
- Definition Classes
- CanBeLazy
-
def
onWrite(path: String, spark: SparkSession): Unit
- Definition Classes
- EntityRulerModel → HasStorageModel → ParamsAndFeaturesWritable
-
val
optionalInputAnnotatorTypes: Array[String]
- Definition Classes
- EntityRulerModel → HasInputAnnotationCols
-
val
outputAnnotatorType: AnnotatorType
- Definition Classes
- EntityRulerModel → HasOutputAnnotatorType
-
lazy val
params: Array[Param[_]]
- Definition Classes
- Params
-
var
parent: Estimator[EntityRulerModel]
- Definition Classes
- Model
-
def
save(path: String): Unit
- Definition Classes
- MLWritable
- Annotations
- @Since( "1.6.0" ) @throws( ... )
-
def
saveStorage(path: String, spark: SparkSession, withinStorage: Boolean = false): Unit
- Definition Classes
- HasStorageModel
-
def
serializeStorage(path: String, spark: SparkSession): Unit
- Definition Classes
- HasStorageModel
-
final
def
set[T](param: Param[T], value: T): EntityRulerModel.this.type
- Definition Classes
- Params
- def setAutomatonModelIfNotSet(spark: SparkSession, automaton: Option[AhoCorasickAutomaton]): EntityRulerModel.this.type
-
def
setEnableInMemoryStorage(value: Boolean): EntityRulerModel.this.type
- Definition Classes
- HasStorageOptions
-
def
setIncludeStorage(value: Boolean): EntityRulerModel.this.type
- Definition Classes
- HasStorageOptions
-
final
def
setInputCols(value: String*): EntityRulerModel.this.type
- Definition Classes
- HasInputAnnotationCols
-
def
setInputCols(value: Array[String]): EntityRulerModel.this.type
Overrides required annotators column if different than default
Overrides required annotators column if different than default
- Definition Classes
- HasInputAnnotationCols
-
def
setLazyAnnotator(value: Boolean): EntityRulerModel.this.type
- Definition Classes
- CanBeLazy
-
final
def
setOutputCol(value: String): EntityRulerModel.this.type
Overrides annotation column name when transforming
Overrides annotation column name when transforming
- Definition Classes
- HasOutputAnnotationCol
-
def
setParent(parent: Estimator[EntityRulerModel]): EntityRulerModel
- Definition Classes
- Model
-
def
setStorageRef(value: String): EntityRulerModel.this.type
- Definition Classes
- HasStorageRef
-
def
toString(): String
- Definition Classes
- Identifiable → AnyRef → Any
-
final
def
transform(dataset: Dataset[_]): DataFrame
Given requirements are met, this applies ML transformation within a Pipeline or stand-alone Output annotation will be generated as a new column, previous annotations are still available separately metadata is built at schema level to record annotations structural information outside its content
Given requirements are met, this applies ML transformation within a Pipeline or stand-alone Output annotation will be generated as a new column, previous annotations are still available separately metadata is built at schema level to record annotations structural information outside its content
- dataset
Dataset[Row]
- 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
requirement for pipeline transformation validation.
requirement for pipeline transformation validation. It is called on fit()
- Definition Classes
- RawAnnotator → PipelineStage
-
val
uid: String
- Definition Classes
- EntityRulerModel → Identifiable
-
def
validateStorageRef(dataset: Dataset[_], inputCols: Array[String], annotatorType: String): Unit
- Definition Classes
- HasStorageRef
-
def
write: MLWriter
- Definition Classes
- ParamsAndFeaturesWritable → DefaultParamsWritable → MLWritable
Parameter setters
-
def
setCaseSensitive(value: Boolean): EntityRulerModel.this.type
- Definition Classes
- HasCaseSensitiveProperties
Parameter getters
-
def
getCaseSensitive: Boolean
- Definition Classes
- HasCaseSensitiveProperties