Packages

class AssertionDLModel extends nlp.annotators.assertion.dl.AssertionDLModel

This is a main class in AssertionDL family. A Deep Learning based approach is used to extract Assertion Status from extracted entities and text. AssertionDLModel requires DOCUMENT, CHUNK and WORD_EMBEDDINGS type annotator inputs, which can be obtained by e.g a DocumentAssembler, NerConverter and WordEmbeddingsModel. The result is an assertion status annotation for each recognized entity. Possible values include “present”, “absent”, “hypothetical”, “conditional”, “associated_with_other_person” etc.

For pretrained models please see the Models Hub for available models.

Example

Define pipeline stages to extract NER chunks first

val data = Seq(
  "Patient with severe fever and sore throat",
  "Patient shows no stomach pain",
  "She was maintained on an epidural and PCA for pain control.").toDF("text")
val documentAssembler = new DocumentAssembler().setInputCol("text").setOutputCol("document")
val sentenceDetector = new SentenceDetector().setInputCols("document").setOutputCol("sentence")
val tokenizer = new Tokenizer().setInputCols("sentence").setOutputCol("token")
val embeddings = WordEmbeddingsModel.pretrained("embeddings_clinical", "en", "clinical/models")
  .setOutputCol("embeddings")
val nerModel = MedicalNerModel.pretrained("ner_clinical", "en", "clinical/models")
  .setInputCols("sentence", "token", "embeddings").setOutputCol("ner")
val nerConverter = new NerConverter().setInputCols("sentence", "token", "ner").setOutputCol("ner_chunk")

Then a pretrained AssertionDLModel is used to extract the assertion status

val clinicalAssertion = AssertionDLModel.pretrained("assertion_dl", "en", "clinical/models")
  .setInputCols("sentence", "ner_chunk", "embeddings")
  .setOutputCol("assertion")

val assertionPipeline = new Pipeline().setStages(Array(
  documentAssembler,
  sentenceDetector,
  tokenizer,
  embeddings,
  nerModel,
  nerConverter,
  clinicalAssertion
))

val assertionModel = assertionPipeline.fit(data)

Show results

val result = assertionModel.transform(data)
result.selectExpr("ner_chunk.result", "assertion.result").show(3, truncate=false)
+--------------------------------+--------------------------------+
|result                          |result                          |
+--------------------------------+--------------------------------+
|[severe fever, sore throat]     |[present, present]              |
|[stomach pain]                  |[absent]                        |
|[an epidural, PCA, pain control]|[present, present, hypothetical]|
+--------------------------------+--------------------------------+
See also

AssertionDLApproach for training a custom AssertionDLModel

AssertionLogRegModel for non deep learning based extraction

Linear Supertypes
nlp.annotators.assertion.dl.AssertionDLModel, CheckLicense, HandleExceptionParams, HasSimpleAnnotate[nlp.annotators.assertion.dl.AssertionDLModel], HasStorageRef, WriteTensorflowModel, WhiteAndBlackListParams, AssertionDLParams, AnnotatorModel[nlp.annotators.assertion.dl.AssertionDLModel], CanBeLazy, RawAnnotator[nlp.annotators.assertion.dl.AssertionDLModel], HasOutputAnnotationCol, HasInputAnnotationCols, HasOutputAnnotatorType, ParamsAndFeaturesWritable, HasFeatures, DefaultParamsWritable, MLWritable, Model[nlp.annotators.assertion.dl.AssertionDLModel], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. AssertionDLModel
  2. AssertionDLModel
  3. CheckLicense
  4. HandleExceptionParams
  5. HasSimpleAnnotate
  6. HasStorageRef
  7. WriteTensorflowModel
  8. WhiteAndBlackListParams
  9. AssertionDLParams
  10. AnnotatorModel
  11. CanBeLazy
  12. RawAnnotator
  13. HasOutputAnnotationCol
  14. HasInputAnnotationCols
  15. HasOutputAnnotatorType
  16. ParamsAndFeaturesWritable
  17. HasFeatures
  18. DefaultParamsWritable
  19. MLWritable
  20. Model
  21. Transformer
  22. PipelineStage
  23. Logging
  24. Params
  25. Serializable
  26. Serializable
  27. Identifiable
  28. AnyRef
  29. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AssertionDLModel()
  2. new AssertionDLModel(uid: String)

    uid

    a unique identifier for the instantiated AnnotatorModel

Type Members

  1. type AnnotationContent = Seq[Row]
    Attributes
    protected
    Definition Classes
    AnnotatorModel
  2. type AnnotatorType = String
    Definition Classes
    HasOutputAnnotatorType

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def $[T](param: Param[T]): T
    Attributes
    protected
    Definition Classes
    Params
  4. def $$[T](feature: StructFeature[T]): T
    Attributes
    protected
    Definition Classes
    HasFeatures
  5. def $$[K, V](feature: MapFeature[K, V]): Map[K, V]
    Attributes
    protected
    Definition Classes
    HasFeatures
  6. def $$[T](feature: SetFeature[T]): Set[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  7. def $$[T](feature: ArrayFeature[T]): Array[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def _transform(dataset: Dataset[_], recursivePipeline: Option[PipelineModel]): DataFrame
    Attributes
    protected
    Definition Classes
    AnnotatorModel
  10. def afterAnnotate(dataset: DataFrame): DataFrame
    Attributes
    protected
    Definition Classes
    AnnotatorModel
  11. def annotate(annotations: Seq[Annotation]): Seq[Annotation]

    This is main point of interest.

    This is main point of interest. It annotates the input dataset applying properties of the class above This method utilises chunk groups, word piece embeddings and conversion to chunk indexes

    annotations

    a sequence of Annotations

    returns

    a sequence of projected Annotations

    Definition Classes
    AssertionDLModelAssertionDLModel → HasSimpleAnnotate
  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. val batchSize: IntParam

    Size for each batch in the optimization process (Default: 64)

    Size for each batch in the optimization process (Default: 64)

    Definition Classes
    AssertionDLParams
  14. def beforeAnnotate(dataset: Dataset[_]): Dataset[_]

    This method validates the dataset before annotation

    This method validates the dataset before annotation

    dataset

    a collection of inputs to validate

    returns

    a Dataset after validation

    Attributes
    protected
    Definition Classes
    AssertionDLModelAssertionDLModel → AnnotatorModel
  15. val blackList: StringArrayParam

    If defined, list of entities to ignore.

    If defined, list of entities to ignore. The rest will be processed. Should not include IOB prefix on labels. Default: Array()

    Definition Classes
    WhiteAndBlackListParams
  16. val caseSensitive: BooleanParam

    Determines whether the definitions of the white listed and black listed entities are case sensitive or not.

    Determines whether the definitions of the white listed and black listed entities are case sensitive or not. Default: true

    Definition Classes
    WhiteAndBlackListParams
  17. def checkEntityAssertion(entity: String, assertion: String): Boolean
    Definition Classes
    AssertionDLModel
  18. final def checkSchema(schema: StructType, inputAnnotatorType: String): Boolean
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  19. def checkValidEnvironment(spark: Option[SparkSession], scopes: Seq[String]): Unit
    Definition Classes
    CheckLicense
  20. def checkValidScope(scope: String): Unit
    Definition Classes
    CheckLicense
  21. def checkValidScopeAndEnvironment(scope: String, spark: Option[SparkSession], checkLp: Boolean): Unit
    Definition Classes
    CheckLicense
  22. def checkValidScopesAndEnvironment(scopes: Seq[String], spark: Option[SparkSession], checkLp: Boolean): Unit
    Definition Classes
    CheckLicense
  23. val chunkCol: Param[String]

    Column with extracted NER chunks

    Column with extracted NER chunks

    Definition Classes
    AssertionDLParams
  24. val classes: StringArrayParam

    List of internal copies of classes used to train for Python

    List of internal copies of classes used to train for Python

    Definition Classes
    AssertionDLModel
  25. final def clear(param: Param[_]): AssertionDLModel.this.type
    Definition Classes
    Params
  26. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  27. val configProtoBytes: IntArrayParam

    ConfigProto from tensorflow, serialized into byte array.

    ConfigProto from tensorflow, serialized into byte array. Get with config_proto.SerializeToString()

    Definition Classes
    AssertionDLParams
  28. def copy(extra: ParamMap): nlp.annotators.assertion.dl.AssertionDLModel

    requirement for annotators copies

    requirement for annotators copies

    Definition Classes
    AssertionDLModel → RawAnnotator → Model → Transformer → PipelineStage → Params
  29. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  30. def createDatabaseConnection(database: Name): RocksDBConnection
    Definition Classes
    HasStorageRef
  31. val datasetInfo: Param[String]

    Descriptive information about the dataset being used.

    Descriptive information about the dataset being used.

    Definition Classes
    AssertionDLParams
  32. val datasetParams: StructFeature[DatasetEncoderParams]

    Collection of Parameters, which are used by method annotate()

    Collection of Parameters, which are used by method annotate()

    Definition Classes
    AssertionDLModel
  33. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  34. def dfAnnotate: UserDefinedFunction
    Definition Classes
    HasSimpleAnnotate
  35. val doExceptionHandling: BooleanParam

    If true, exceptions are handled.

    If true, exceptions are handled. If exception causing data is passed to the model, a error annotation is emitted which has the exception message. Processing continues with the next one. This comes with a performance penalty.

    Definition Classes
    HandleExceptionParams
  36. val dropout: FloatParam

    Dropout at the output of each layer (Default: 0.05f)

    Dropout at the output of each layer (Default: 0.05f)

    Definition Classes
    AssertionDLParams
  37. val enableOutputLogs: BooleanParam

    Whether to output to annotators log folder (Default: false)

    Whether to output to annotators log folder (Default: false)

    Definition Classes
    AssertionDLParams
  38. val endCol: Param[String]

    Column with token number for last target token

    Column with token number for last target token

    Definition Classes
    AssertionDLParams
  39. var entityAssertionCaseSensitive: BooleanParam

    Determines whether entity labels and assertion labels are case sensitive

    Determines whether entity labels and assertion labels are case sensitive

    Definition Classes
    AssertionDLModel
  40. val epochs: IntParam

    Number of epochs for the optimization process (Default: 5)

    Number of epochs for the optimization process (Default: 5)

    Definition Classes
    AssertionDLParams
  41. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  43. def evaluateFilter(filter: String): Boolean

    Filter annotations by blackList and whiteList, taking into account the caseSensitive param.

    Filter annotations by blackList and whiteList, taking into account the caseSensitive param.

    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  44. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  45. def explainParams(): String
    Definition Classes
    Params
  46. def extraValidate(structType: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  47. def extraValidateMsg: String
    Attributes
    protected
    Definition Classes
    RawAnnotator
  48. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  49. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  50. val features: ArrayBuffer[Feature[_, _, _]]
    Definition Classes
    HasFeatures
  51. def filterByEntityField(annotation: Annotation): Boolean

    Filter annotation by blackList and whiteList, taking into account the caseSensitive param.

    Filter annotation by blackList and whiteList, taking into account the caseSensitive param. It filters by annotation.metadata.getOrElse("entity", annotation.metadata.getOrElse("identifier", "")).toString

    returns

    Boolean

    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  52. def filterByEntityField(annotations: Seq[Annotation]): Seq[Annotation]

    Filter annotations by blackList and whiteList, taking into account the caseSensitive param.

    Filter annotations by blackList and whiteList, taking into account the caseSensitive param. It filters by annotation.metadata.getOrElse("entity", annotation.metadata.getOrElse("identifier", "")).toString

    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  53. def filterByWhiteAndBlackList(annotation: Annotation): Boolean

    Filter annotation by blackList and whiteList, taking into account the caseSensitive param.

    Filter annotation by blackList and whiteList, taking into account the caseSensitive param. It filters by annotation.result

    returns

    Boolean

    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  54. def filterByWhiteAndBlackList(annotations: Seq[Annotation]): Seq[Annotation]

    Filter annotations by blackList and whiteList, taking into account the caseSensitive param.

    Filter annotations by blackList and whiteList, taking into account the caseSensitive param. It filters by annotation.result

    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  55. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  56. def get[T](feature: StructFeature[T]): Option[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  57. def get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  58. def get[T](feature: SetFeature[T]): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  59. def get[T](feature: ArrayFeature[T]): Option[Array[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  60. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  61. def getBlackList: Array[String]

    Gets blackList param

    Gets blackList param

    Definition Classes
    WhiteAndBlackListParams
  62. def getCaseSensitive: Boolean

    Gets caseSensitive param

    Gets caseSensitive param

    Definition Classes
    WhiteAndBlackListParams
  63. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  64. def getClasses: Array[String]

    get the tags used to trained this NerDLModel

    get the tags used to trained this NerDLModel

    Definition Classes
    AssertionDLModel
  65. def getConfigProtoBytes: Option[Array[Byte]]

    ConfigProto from tensorflow, serialized into byte array.

    ConfigProto from tensorflow, serialized into byte array. Get with config_proto.SerializeToString()

    Definition Classes
    AssertionDLParams
  66. def getConfigProtoBytesAsInt: Option[Array[Int]]
    Definition Classes
    AssertionDLModel
  67. def getDatasetInfo: String

    get descriptive information about the dataset being used

    get descriptive information about the dataset being used

    Definition Classes
    AssertionDLParams
  68. def getDatasetParams: DatasetEncoderParams
    Definition Classes
    AssertionDLModel
  69. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  70. def getEnableOutputLogs: Boolean

    Whether to output to annotators log folder

    Whether to output to annotators log folder

    Definition Classes
    AssertionDLParams
  71. def getEntityAssertion: Map[String, Array[String]]

    Get the lists of assertion labels allowed for a given entity

    Get the lists of assertion labels allowed for a given entity

    Definition Classes
    AssertionDLModel
  72. def getEntityAssertionCaseSensitive: Boolean

    Gets the case sensitivity of entities and assertion labels

    Gets the case sensitivity of entities and assertion labels

    Definition Classes
    AssertionDLModel
  73. def getEntityAssertionStr: String

    Get the string representation of the lists of assertion labels allowed for a given entity

    Get the string representation of the lists of assertion labels allowed for a given entity

    Definition Classes
    AssertionDLModel
  74. def getIncludeConfidence: Boolean

    whether to include confidence scores in annotation metadata

    whether to include confidence scores in annotation metadata

    Definition Classes
    AssertionDLParams
  75. def getInputCols: Array[String]
    Definition Classes
    HasInputAnnotationCols
  76. def getLazyAnnotator: Boolean
    Definition Classes
    CanBeLazy
  77. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  78. final def getOutputCol: String
    Definition Classes
    HasOutputAnnotationCol
  79. def getOutputLogsPath: String

    Folder path to save training logs

    Folder path to save training logs

    Definition Classes
    AssertionDLParams
  80. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  81. def getReplaceLabels: Map[String, String]

    Gets the assertion labels to be replaced for the specified new labels.

    Gets the assertion labels to be replaced for the specified new labels.

    Definition Classes
    AssertionDLModel
  82. def getReplaceLabelsStr: String

    Gets the string presentation of the assertion labels to be replaced for the specified new labels.

    Gets the string presentation of the assertion labels to be replaced for the specified new labels.

    Definition Classes
    AssertionDLModel
  83. def getScopeWindow: (Int, Int)

    Get scope window

    Get scope window

    Definition Classes
    AssertionDLParams
  84. def getStorageRef: String
    Definition Classes
    HasStorageRef
  85. def getWhiteList: Array[String]

    Gets whiteList param

    Gets whiteList param

    Definition Classes
    WhiteAndBlackListParams
  86. val graphFile: Param[String]

    File path that contain external graph file.

    File path that contain external graph file. When specified, the provided file will be used, and no graph search will happen. The path can be a local file path, a distributed file path (HDFS, DBFS), or a cloud storage (S3).

    Definition Classes
    AssertionDLParams
  87. val graphFolder: Param[String]

    Folder path that contain external graph files.

    Folder path that contain external graph files.

    Folder path that contain external graph files. The path can a local file path, a distributed file path (HDFS, DBFS), or a cloud storage (S3).

    Definition Classes
    AssertionDLParams
  88. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  89. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  90. def hasParent: Boolean
    Definition Classes
    Model
  91. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  92. val includeConfidence: BooleanParam

    Whether to include confidence scores in annotation metadata

    Whether to include confidence scores in annotation metadata

    Definition Classes
    AssertionDLParams
  93. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  94. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  95. val inputAnnotatorTypes: Array[String]

    Input annotator types: DOCUMENT, CHUNK, WORD_EMBEDDINGS

    Input annotator types: DOCUMENT, CHUNK, WORD_EMBEDDINGS

    Definition Classes
    AssertionDLModel → HasInputAnnotationCols
  96. final val inputCols: StringArrayParam
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  97. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  98. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  99. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  100. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  101. def isValueInList(value: String, list: Array[String]): Boolean
    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  102. def isWhiteListAndBlacklistEmpty: Boolean
    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  103. val labelCol: Param[String]

    Column with one label per document.

    Column with one label per document. Example of possible values: “present”, “absent”, “hypothetical”, “conditional”, “associated_with_other_person”, etc.

    Definition Classes
    AssertionDLParams
  104. val lazyAnnotator: BooleanParam
    Definition Classes
    CanBeLazy
  105. val learningRate: FloatParam

    Learning rate for the optimization process (Default: 0.0012f)

    Learning rate for the optimization process (Default: 0.0012f)

    Definition Classes
    AssertionDLParams
  106. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  107. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  108. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  109. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  110. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  111. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  112. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  113. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  114. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  115. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  116. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  117. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  118. val maxSentLen: IntParam

    Max possible length of a sentence, must match graph model (Default: 250)

    Max possible length of a sentence, must match graph model (Default: 250)

    Definition Classes
    AssertionDLParams
  119. def model: TensorflowAssertion

    Tensorflow model for the AssertionDLModel.

    Tensorflow model for the AssertionDLModel. This is used to generate the predictions.

    Definition Classes
    AssertionDLModel
  120. def msgHelper(schema: StructType): String
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  121. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  122. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  123. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  124. def onWrite(path: String, spark: SparkSession): Unit
    Definition Classes
    AssertionDLModel → ParamsAndFeaturesWritable
  125. val optionalInputAnnotatorTypes: Array[String]
    Definition Classes
    HasInputAnnotationCols
  126. val outputAnnotatorType: AnnotatorType

    Output annotator types: ASSERTION

    Output annotator types: ASSERTION

    Definition Classes
    AssertionDLModel → HasOutputAnnotatorType
  127. final val outputCol: Param[String]
    Attributes
    protected
    Definition Classes
    HasOutputAnnotationCol
  128. val outputLogsPath: Param[String]

    Folder path to save training logs.

    Folder path to save training logs. If no path is specified, the logs won't be stored in disk. The path can be a local file path, a distributed file path (HDFS, DBFS), or a cloud storage (S3).

    Definition Classes
    AssertionDLParams
  129. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  130. var parent: Estimator[nlp.annotators.assertion.dl.AssertionDLModel]
    Definition Classes
    Model
  131. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  132. val scopeWindow: IntArrayParam

    The scope window of the assertion (whole sentence by default)

    The scope window of the assertion (whole sentence by default)

    Definition Classes
    AssertionDLParams
  133. def set[T](feature: StructFeature[T], value: T): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  134. def set[K, V](feature: MapFeature[K, V], value: Map[K, V]): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  135. def set[T](feature: SetFeature[T], value: Set[T]): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  136. def set[T](feature: ArrayFeature[T], value: Array[T]): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  137. final def set(paramPair: ParamPair[_]): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  138. final def set(param: String, value: Any): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  139. final def set[T](param: Param[T], value: T): AssertionDLModel.this.type
    Definition Classes
    Params
  140. def setAllowList(list: String*): AssertionDLModel.this.type
    Definition Classes
    WhiteAndBlackListParams
  141. def setAllowList(list: Array[String]): AssertionDLModel.this.type
    Definition Classes
    WhiteAndBlackListParams
  142. def setBatchSize(size: Int): AssertionDLModel.this.type

    Size for each batch in the optimization process

    Size for each batch in the optimization process

    Definition Classes
    AssertionDLParams
  143. def setBlackList(list: String*): AssertionDLModel.this.type
    Definition Classes
    WhiteAndBlackListParams
  144. def setBlackList(list: Array[String]): AssertionDLModel.this.type

    If defined, list of entities to ignore.

    If defined, list of entities to ignore. The rest will be processed. Should not include IOB prefix on labels. Default: Array()

    Definition Classes
    WhiteAndBlackListParams
  145. def setCaseSensitive(value: Boolean): AssertionDLModel.this.type

    Determines whether the definitions of the white listed and black listed entities are case sensitive or not.

    Determines whether the definitions of the white listed and black listed entities are case sensitive or not. Default: true

    Definition Classes
    WhiteAndBlackListParams
  146. def setChunkCol(c: String): AssertionDLModel.this.type

    Column with extracted NER chunks

    Column with extracted NER chunks

    Definition Classes
    AssertionDLParams
  147. def setConfigProtoBytes(bytes: Array[Int]): AssertionDLModel.this.type

    ConfigProto from tensorflow, serialized into byte array.

    ConfigProto from tensorflow, serialized into byte array. Get with config_proto.SerializeToString()

    Definition Classes
    AssertionDLParams
  148. def setDatasetInfo(value: String): AssertionDLModel.this.type

    set descriptive information about the dataset being used

    set descriptive information about the dataset being used

    Definition Classes
    AssertionDLParams
  149. def setDatasetParams(params: DatasetEncoderParams): nlp.annotators.assertion.dl.AssertionDLModel

    Collection of Parameters, which are used by method annotate()

    Collection of Parameters, which are used by method annotate()

    Definition Classes
    AssertionDLModel
  150. def setDefault[T](feature: StructFeature[T], value: () ⇒ T): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  151. def setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  152. def setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  153. def setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  154. final def setDefault(paramPairs: ParamPair[_]*): AssertionDLModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  155. final def setDefault[T](param: Param[T], value: T): AssertionDLModel.this.type
    Attributes
    protected[org.apache.spark.ml]
    Definition Classes
    Params
  156. def setDenyList(list: String*): AssertionDLModel.this.type
    Definition Classes
    WhiteAndBlackListParams
  157. def setDenyList(list: Array[String]): AssertionDLModel.this.type
    Definition Classes
    WhiteAndBlackListParams
  158. def setDoExceptionHandling(value: Boolean): AssertionDLModel.this.type

    If true, exceptions are handled.

    If true, exceptions are handled. If exception causing data is passed to the model, a error annotation is emitted which has the exception message. Processing continues with the next one. This comes with a performance penalty.

    Definition Classes
    HandleExceptionParams
  159. def setDropout(factor: Float): AssertionDLModel.this.type

    Dropout at the output of each layer

    Dropout at the output of each layer

    Definition Classes
    AssertionDLParams
  160. def setEnableOutputLogs(v: Boolean): AssertionDLModel.this.type

    Whether to output to annotators log folder

    Whether to output to annotators log folder

    Definition Classes
    AssertionDLParams
  161. def setEndCol(e: String): AssertionDLModel.this.type

    Column with token number for last target token

    Column with token number for last target token

    Definition Classes
    AssertionDLParams
  162. def setEntityAssertion(assertionEntities: HashMap[String, List[String]]): AssertionDLModel.this.type

    Set the lists of assertion labels allowed for a given entity.

    Set the lists of assertion labels allowed for a given entity.

    Definition Classes
    AssertionDLModel
    Note

    entityAssertion functionality is processed earlier than replaceLabels

  163. def setEntityAssertion(assertionEntities: Map[String, Array[String]]): AssertionDLModel.this.type

    Set the lists of assertion labels allowed for a given entity.

    Set the lists of assertion labels allowed for a given entity.

    Definition Classes
    AssertionDLModel
    Note

    entityAssertion functionality is processed earlier than replaceLabels

  164. def setEntityAssertionCaseSensitive(value: Boolean): nlp.annotators.assertion.dl.AssertionDLModel

    Sets the case sensitivity of entities and assertion labels

    Sets the case sensitivity of entities and assertion labels

    Definition Classes
    AssertionDLModel
  165. def setEpochs(number: Int): AssertionDLModel.this.type

    Number of epochs for the optimization process

    Number of epochs for the optimization process

    Definition Classes
    AssertionDLParams
  166. def setGraphFile(path: String): AssertionDLModel.this.type

    Folder path that contain external graph files

    Folder path that contain external graph files

    Definition Classes
    AssertionDLParams
  167. def setGraphFolder(path: String): AssertionDLModel.this.type

    Folder path that contain external graph files

    Folder path that contain external graph files

    Definition Classes
    AssertionDLParams
  168. def setIncludeConfidence(value: Boolean): AssertionDLModel.this.type

    Whether to include confidence scores in annotation metadata

    Whether to include confidence scores in annotation metadata

    Definition Classes
    AssertionDLParams
  169. final def setInputCols(value: String*): AssertionDLModel.this.type
    Definition Classes
    HasInputAnnotationCols
  170. def setInputCols(value: Array[String]): AssertionDLModel.this.type
    Definition Classes
    HasInputAnnotationCols
  171. def setLabelCol(label: String): AssertionDLModel.this.type

    Column with one label per document

    Column with one label per document

    Definition Classes
    AssertionDLParams
  172. def setLazyAnnotator(value: Boolean): AssertionDLModel.this.type
    Definition Classes
    CanBeLazy
  173. def setLearningRate(rate: Float): AssertionDLModel.this.type

    Learning rate for the optimization process

    Learning rate for the optimization process

    Definition Classes
    AssertionDLParams
  174. def setMaxSentLen(len: Int): AssertionDLModel.this.type

    Max possible length of a sentence, must match graph model

    Max possible length of a sentence, must match graph model

    Definition Classes
    AssertionDLParams
  175. final def setOutputCol(value: String): AssertionDLModel.this.type
    Definition Classes
    HasOutputAnnotationCol
  176. def setOutputLogsPath(v: String): AssertionDLModel.this.type

    Folder path to save training logs

    Folder path to save training logs

    Definition Classes
    AssertionDLParams
  177. def setParent(parent: Estimator[nlp.annotators.assertion.dl.AssertionDLModel]): nlp.annotators.assertion.dl.AssertionDLModel
    Definition Classes
    Model
  178. def setReplaceLabels(value: Map[String, String]): AssertionDLModel.this.type

    Sets the replaceLabels to be replaced for the specified new labels.

    Sets the replaceLabels to be replaced for the specified new labels.

    value

    A map containing the replacement labels.

    Definition Classes
    AssertionDLModel
    Note

    replaceLabels functionality runs later than entityAssertion

  179. def setReplaceLabels(value: HashMap[String, String]): AssertionDLModel.this.type

    Sets the replaceLabels to be replaced for the specified new labels.

    Sets the replaceLabels to be replaced for the specified new labels.

    value

    A map containing the replacement labels.

    Definition Classes
    AssertionDLModel
    Note

    replaceLabels functionality is processed later than entityAssertion

  180. def setScopeWindow(window: (Int, Int)): AssertionDLModel.this.type

    Max possible length of a sentence.

    Max possible length of a sentence.

    Definition Classes
    AssertionDLParams
  181. def setStartCol(s: String): AssertionDLModel.this.type

    Column with token number for first target token

    Column with token number for first target token

    Definition Classes
    AssertionDLParams
  182. def setStorageRef(value: String): AssertionDLModel.this.type
    Definition Classes
    HasStorageRef
  183. def setTensorflow(spark: SparkSession, tf: TensorflowWrapper): nlp.annotators.assertion.dl.AssertionDLModel
    Definition Classes
    AssertionDLModel
  184. def setValidationSplit(validationSplit: Float): AssertionDLModel.this.type

    Choose the proportion of training dataset to be validated against the model on each Epoch.

    Choose the proportion of training dataset to be validated against the model on each Epoch. The value should be between 0.0 and 1.0 and by default it is 0.0 and off.

    Definition Classes
    AssertionDLParams
  185. def setVerbose(verbose: Level): AssertionDLModel.this.type

    Level of verbosity during training

    Level of verbosity during training

    Definition Classes
    AssertionDLParams
  186. def setWhiteList(list: String*): AssertionDLModel.this.type
    Definition Classes
    WhiteAndBlackListParams
  187. def setWhiteList(list: Array[String]): AssertionDLModel.this.type

    Sets the list of entities to process.

    Sets the list of entities to process. The rest will be ignored. Should not include IOB prefix on labels. Default: Array()

    Definition Classes
    WhiteAndBlackListParams
  188. val startCol: Param[String]

    Column with token number for first target token

    Column with token number for first target token

    Definition Classes
    AssertionDLParams
  189. val storageRef: Param[String]
    Definition Classes
    HasStorageRef
  190. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  191. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  192. final def transform(dataset: Dataset[_]): DataFrame
    Definition Classes
    AnnotatorModel → Transformer
  193. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  194. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  195. final def transformSchema(schema: StructType): StructType
    Definition Classes
    RawAnnotator → PipelineStage
  196. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  197. val uid: String
    Definition Classes
    AssertionDLModelAssertionDLModel → Identifiable
  198. def validate(schema: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  199. def validateStorageRef(dataset: Dataset[_], inputCols: Array[String], annotatorType: String): Unit
    Definition Classes
    HasStorageRef
  200. val validationSplit: FloatParam

    The proportion of training dataset to be used as validation set.

    The proportion of training dataset to be used as validation set.

    The model will be validated against this dataset on each Epoch and will not be used for training. The value should be between 0.0 and 1.0.

    Definition Classes
    AssertionDLParams
  201. val verbose: IntParam

    Level of verbosity during training

    Level of verbosity during training

    Definition Classes
    AssertionDLParams
  202. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  203. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  204. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  205. val whiteList: StringArrayParam

    If defined, list of entities to process.

    If defined, list of entities to process. The rest will be ignored. Should not include IOB prefix on labels. Default: Array()

    Definition Classes
    WhiteAndBlackListParams
  206. def wrapColumnMetadata(col: Column): Column
    Attributes
    protected
    Definition Classes
    RawAnnotator
  207. def write: MLWriter
    Definition Classes
    ParamsAndFeaturesWritable → DefaultParamsWritable → MLWritable
  208. def writeTensorflowHub(path: String, tfPath: String, spark: SparkSession, suffix: String): Unit
    Definition Classes
    WriteTensorflowModel
  209. def writeTensorflowModel(path: String, spark: SparkSession, tensorflow: TensorflowWrapper, suffix: String, filename: String, configProtoBytes: Option[Array[Byte]]): Unit
    Definition Classes
    WriteTensorflowModel
  210. def writeTensorflowModelV2(path: String, spark: SparkSession, tensorflow: TensorflowWrapper, suffix: String, filename: String, configProtoBytes: Option[Array[Byte]], savedSignatures: Option[Map[String, String]]): Unit
    Definition Classes
    WriteTensorflowModel

Inherited from CheckLicense

Inherited from HandleExceptionParams

Inherited from HasSimpleAnnotate[nlp.annotators.assertion.dl.AssertionDLModel]

Inherited from HasStorageRef

Inherited from WriteTensorflowModel

Inherited from WhiteAndBlackListParams

Inherited from AssertionDLParams

Inherited from AnnotatorModel[nlp.annotators.assertion.dl.AssertionDLModel]

Inherited from CanBeLazy

Inherited from RawAnnotator[nlp.annotators.assertion.dl.AssertionDLModel]

Inherited from HasOutputAnnotationCol

Inherited from HasInputAnnotationCols

Inherited from HasOutputAnnotatorType

Inherited from ParamsAndFeaturesWritable

Inherited from HasFeatures

Inherited from DefaultParamsWritable

Inherited from MLWritable

Inherited from Transformer

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

Parameters

Annotator types

Required input and expected output annotator types

Members

Parameter setters

Parameter getters