Packages

class AssertionMerger extends AnnotatorModel[AssertionMerger] with HasSimpleAnnotate[AssertionMerger] with WhiteAndBlackListParams with AssertionPrioritizationParams

Merges variety assertion columns coming from Assertion annotators like com.johnsnowlabs.nlp.annotators.assertion.dl.AssertionDLModel.

See also

com.johnsnowlabs.nlp.annotators.assertion.dl.AssertionDLModel AssertionMerger can filter, prioritize and merge assertion annotations by using proper parameters.

AssertionPrioritizationParams

WhiteAndBlackListParams

Example

val document_assembler = new DocumentAssembler()
 .setInputCol("text").setOutputCol("document")
val sentence_detector = SentenceDetectorDLModel.pretrained("sentence_detector_dl_healthcare", "en", "clinical/models")
 .setInputCols(Array("document")).setOutputCol("sentence")
val tokenizer = new Tokenizer()
 .setInputCols(Array("sentence")).setOutputCol("token")
val word_embeddings = WordEmbeddingsModel.pretrained("embeddings_clinical", "en", "clinical/models")
 .setInputCols(Array("sentence", "token")).setOutputCol("embeddings")
val ner_model = MedicalNerModel.pretrained("ner_opioid", "en", "clinical/models")
 .setInputCols(Array("sentence", "token", "embeddings")).setOutputCol("ner")
val ner_converter = new NerConverterInternal()
 .setInputCols(Array("sentence", "token", "ner")).setOutputCol("ner_chunk")
 .setWhiteList(Array("opioid_drug", "other_drug"))
val assertion = AssertionDLModel.pretrained("assertion_opioid_drug_status_wip", "en", "clinical/models")
 .setInputCols(Array("sentence", "ner_chunk", "embeddings")).setOutputCol("assertion")
val assertion2 = AssertionDLModel.pretrained("assertion_opioid_wip", "en", "clinical/models")
 .setInputCols(Array("sentence", "ner_chunk", "embeddings")).setOutputCol("assertion2")

val assertion_merger = new AssertionMerger()
 .setInputCols("assertion", "assertion2")
 .setOutputCol("assertion_merger")
 .setMergeOverlapping(true)
 .setSelectionStrategy("Sequential")
 .setAssertionSourcePrecedence("assertion2,assertion")
 .setBlackList(Array("HYPothetical"))
 .setCaseSensitive(false)
 .setAssertionsConfidence(Map("history" -> 0.80f))
 .setOrderingFeatures(Array("length", "source", "confidence"))

val pipeline = new Pipeline().setStages(Array(document_assembler,
 sentence_detector,
 tokenizer,
 word_embeddings,
 ner_model,
 ner_converter,
 assertion,
 assertion2,
 assertion_merger))

val data = Seq("""The patient presented to the hospital for a neurological evaluation, with a documented prescription for Percocet to manage chronic back pain. Assessment revealed ongoing discomfort localized to the lumbar region, with associated numbness and tingling in the lower extremities.""",
 """The patient, with a known history of hypertension managed with atenolol 50mg and verapamil 40mg, presented after a fall resulting in an ankle injury. Examination revealed swelling and tenderness, indicative of a twisted ankle. Considering the patient's medical history and pain management needs, a prescription for tramadol was provided to alleviate discomfort while ensuring minimal impact on blood pressure control.""",
 """The patient presented to the rehabilitation facility with a documented history of opioid abuse, primarily stemming from misuse of prescription percocet pills intended for their partner's use. Initial assessment revealed withdrawal symptoms consistent with opioid dependency, including agitation, diaphoresis, and myalgias.""",
 """The patient presented to the emergency department following an overdose on cocaine. On examination, the patient displayed signs of sympathetic nervous system stimulation, including tachycardia, hypertension, dilated pupils, and agitation.""",
 """The patient, with a documented history of chronic pain syndrome, was admitted following an accidental overdose of prescribed OxyContin. Upon assessment, the patient displayed symptoms indicative of opioid toxicity, including respiratory depression, altered mental status, and pinpoint pupils. Immediate resuscitative measures were undertaken, including airway management, administration of naloxone, and close monitoring of vital signs.""")
.toDF("text")

Show results

 val resultDF = pipeline.fit(data).transform(data)
 resultDF.selectExpr("explode(assertion_merger) as merger").show(false)
+---------------------------------------------------------------------------------------------------------------------+
|merger                                                                                                               |
+---------------------------------------------------------------------------------------------------------------------+
|{assertion, 104, 111, present, {sentence -> 0, chunk -> 0, assertion_source -> assertion2, confidence -> 0.9802}, []}|
|{assertion, 63, 70, history, {sentence -> 0, chunk -> 0, assertion_source -> assertion2, confidence -> 0.8833}, []}  |
|{assertion, 143, 150, present, {sentence -> 0, chunk -> 1, assertion_source -> assertion2, confidence -> 0.905}, []} |
|{assertion, 256, 261, present, {sentence -> 1, chunk -> 2, assertion_source -> assertion2, confidence -> 0.5283}, []}|
|{assertion, 75, 81, present, {sentence -> 0, chunk -> 0, assertion_source -> assertion2, confidence -> 0.6853}, []}  |
|{assertion, 125, 133, present, {sentence -> 0, chunk -> 0, assertion_source -> assertion2, confidence -> 0.5923}, []}|
|{assertion, 198, 203, present, {sentence -> 1, chunk -> 1, assertion_source -> assertion2, confidence -> 0.8479}, []}|
+---------------------------------------------------------------------------------------------------------------------+
Linear Supertypes
AssertionPrioritizationParams, WhiteAndBlackListParams, HasSimpleAnnotate[AssertionMerger], AnnotatorModel[AssertionMerger], CanBeLazy, RawAnnotator[AssertionMerger], HasOutputAnnotationCol, HasInputAnnotationCols, HasOutputAnnotatorType, ParamsAndFeaturesWritable, HasFeatures, DefaultParamsWritable, MLWritable, Model[AssertionMerger], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. AssertionMerger
  2. AssertionPrioritizationParams
  3. WhiteAndBlackListParams
  4. HasSimpleAnnotate
  5. AnnotatorModel
  6. CanBeLazy
  7. RawAnnotator
  8. HasOutputAnnotationCol
  9. HasInputAnnotationCols
  10. HasOutputAnnotatorType
  11. ParamsAndFeaturesWritable
  12. HasFeatures
  13. DefaultParamsWritable
  14. MLWritable
  15. Model
  16. Transformer
  17. PipelineStage
  18. Logging
  19. Params
  20. Serializable
  21. Serializable
  22. Identifiable
  23. AnyRef
  24. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AssertionMerger()
  2. new AssertionMerger(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]

    annotations

    The annotations per row that we need to merge and filter. Annotations should be ASSERTION type.

    returns

    The merged and filtered annotations of ASSERTION.

    Definition Classes
    AssertionMerger → HasSimpleAnnotate
  12. val applyFilterBeforeMerge: BooleanParam

    Whether to apply filtering before merging process.

    Whether to apply filtering before merging process. If true, filtering will be applied before merging; if false, filtering will be applied after merging process. Default: false.

  13. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  14. val assertionSourcePrecedence: Param[String]

    Specifies the assertion sources to use for prioritizing overlapping annotations when the 'source' ordering feature is utilized.

    Specifies the assertion sources to use for prioritizing overlapping annotations when the 'source' ordering feature is utilized. This parameter contains a comma-separated list of assertion sources that drive the prioritization. Annotations will be prioritized based on the order of the given string.

    Definition Classes
    AssertionPrioritizationParams
  15. val assertionsConfidence: MapFeature[String, Float]

    Pairs (assertion,confidenceThreshold) to filter assertions which have confidence lower than the confidence threshold.

  16. lazy val assertionsConfidenceMap: Map[String, Float]
  17. def beforeAnnotate(dataset: Dataset[_]): Dataset[_]
    Attributes
    protected
    Definition Classes
    AnnotatorModel
  18. 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
  19. 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
  20. final def checkSchema(schema: StructType, inputAnnotatorType: String): Boolean
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  21. final def clear(param: Param[_]): AssertionMerger.this.type
    Definition Classes
    Params
  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  23. def copy(extra: ParamMap): AssertionMerger
    Definition Classes
    RawAnnotator → Model → Transformer → PipelineStage → Params
  24. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  25. val defaultConfidence: FloatParam

    When the confidence value is included in the orderingFeatures and a given annotation does not have any confidence, this parameter determines the value to be used.

    When the confidence value is included in the orderingFeatures and a given annotation does not have any confidence, this parameter determines the value to be used. The default value is 0f.

    Definition Classes
    AssertionPrioritizationParams
  26. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  27. def dfAnnotate: UserDefinedFunction
    Definition Classes
    HasSimpleAnnotate
  28. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  30. 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
  31. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  32. def explainParams(): String
    Definition Classes
    Params
  33. def extraValidate(structType: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  34. def extraValidateMsg: String
    Attributes
    protected
    Definition Classes
    RawAnnotator
  35. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  36. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  37. val features: ArrayBuffer[Feature[_, _, _]]
    Definition Classes
    HasFeatures
  38. 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
  39. 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
  40. 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
  41. 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
  42. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  43. def get[T](feature: StructFeature[T]): Option[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  44. def get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  45. def get[T](feature: SetFeature[T]): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  46. def get[T](feature: ArrayFeature[T]): Option[Array[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  47. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  48. def getApplyFilterBeforeMerge: Boolean

    Gets applyFilterBeforeMerge param.

  49. def getAssertionSourcePrecedence: String

    Gets the value of the assertionSourcePrecedence parameter.

    Gets the value of the assertionSourcePrecedence parameter.

    Definition Classes
    AssertionPrioritizationParams
  50. def getBlackList: Array[String]

    Gets blackList param

    Gets blackList param

    Definition Classes
    WhiteAndBlackListParams
  51. def getCaseSensitive: Boolean

    Gets caseSensitive param

    Gets caseSensitive param

    Definition Classes
    WhiteAndBlackListParams
  52. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  53. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  54. def getDefaultConfidence: Float

    Gets the value of the defaultConfidence parameter.

    Gets the value of the defaultConfidence parameter.

    Definition Classes
    AssertionPrioritizationParams
  55. def getInputCols: Array[String]
    Definition Classes
    HasInputAnnotationCols
  56. def getLazyAnnotator: Boolean
    Definition Classes
    CanBeLazy
  57. def getMajorityVoting: Boolean

    Gets the value of the majorityVoting parameter.

  58. def getMergeOverlapping: Boolean

    Gets mergeOverlapping param.

  59. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  60. def getOrderingFeatures: Array[String]

    Gets the value of the orderingFeatures parameter.

    Gets the value of the orderingFeatures parameter.

    Definition Classes
    AssertionPrioritizationParams
  61. final def getOutputCol: String
    Definition Classes
    HasOutputAnnotationCol
  62. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  63. def getSelectionStrategy: String

    Gets selectionStrategy param.

    Gets selectionStrategy param.

    Definition Classes
    AssertionPrioritizationParams
  64. def getSortByBegin: Boolean

    Gets sortByBegin param.

  65. def getWhiteList: Array[String]

    Gets whiteList param

    Gets whiteList param

    Definition Classes
    WhiteAndBlackListParams
  66. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  67. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  68. def hasParent: Boolean
    Definition Classes
    Model
  69. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  70. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  71. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  72. val inputAnnotatorTypes: Array[String]
    Definition Classes
    AssertionMerger → HasInputAnnotationCols
  73. final val inputCols: StringArrayParam
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  74. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  75. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  76. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  77. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  78. def isValueInList(value: String, list: Array[String]): Boolean
    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  79. def isWhiteListAndBlacklistEmpty: Boolean
    Attributes
    protected
    Definition Classes
    WhiteAndBlackListParams
  80. val lazyAnnotator: BooleanParam
    Definition Classes
    CanBeLazy
  81. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  82. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  83. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  84. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  85. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  86. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  87. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  88. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  89. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  90. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  91. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  92. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  93. val majorityVoting: BooleanParam

    Whether to use majority voting to resolve conflicts.

    Whether to use majority voting to resolve conflicts. Default is false. It is used to resolve conflicts when there are more than 2 annotations in the same overlapping group. When confidence is used for ordering features, confidence values sum is used for majority voting.

  94. val mergeOverlapping: BooleanParam

    Whether to merge overlapping matched assertion annotations.

    Whether to merge overlapping matched assertion annotations. Default: true

  95. def msgHelper(schema: StructType): String
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  96. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  97. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  98. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  99. def onWrite(path: String, spark: SparkSession): Unit
    Attributes
    protected
    Definition Classes
    ParamsAndFeaturesWritable
  100. val optionalInputAnnotatorTypes: Array[String]
    Definition Classes
    HasInputAnnotationCols
  101. val orderingFeatures: StringArrayParam

    Specifies the ordering features to use for overlapping entities.

    Specifies the ordering features to use for overlapping entities. Possible values include: 'begin', 'end', 'length', 'source', 'confidence'. Default: Array("begin", "length", "source")

    Definition Classes
    AssertionPrioritizationParams
  102. val outputAnnotatorType: AnnotatorType
    Definition Classes
    AssertionMerger → HasOutputAnnotatorType
  103. final val outputCol: Param[String]
    Attributes
    protected
    Definition Classes
    HasOutputAnnotationCol
  104. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  105. var parent: Estimator[AssertionMerger]
    Definition Classes
    Model
  106. def prioritize(annotations: Seq[Annotation]): Seq[Annotation]
    Attributes
    protected
    Definition Classes
    AssertionPrioritizationParams
  107. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  108. val selectionStrategy: Param[String]

    Determines the strategy for selecting annotations.

    Determines the strategy for selecting annotations.

    Annotations can be selected either sequentially based on their order (Sequential) or using a more diverse strategy (DiverseLonger). Currently, only Sequential and DiverseLonger options are available. The default strategy is Sequential.

    Definition Classes
    AssertionPrioritizationParams
  109. def set[T](feature: StructFeature[T], value: T): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  110. def set[K, V](feature: MapFeature[K, V], value: Map[K, V]): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  111. def set[T](feature: SetFeature[T], value: Set[T]): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  112. def set[T](feature: ArrayFeature[T], value: Array[T]): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  113. final def set(paramPair: ParamPair[_]): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    Params
  114. final def set(param: String, value: Any): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    Params
  115. final def set[T](param: Param[T], value: T): AssertionMerger.this.type
    Definition Classes
    Params
  116. def setAllowList(list: String*): AssertionMerger.this.type
    Definition Classes
    WhiteAndBlackListParams
  117. def setAllowList(list: Array[String]): AssertionMerger.this.type
    Definition Classes
    WhiteAndBlackListParams
  118. def setApplyFilterBeforeMerge(value: Boolean): AssertionMerger.this.type

    Sets whether to apply filtering before merging process.

    Sets whether to apply filtering before merging process. If true, filtering will be applied before merging; if false, filtering will be applied after merging process. Default: false.

  119. def setAssertionSourcePrecedence(value: String): AssertionMerger.this.type

    Sets the assertion sources to use for prioritizing overlapping annotations when the 'source' ordering feature is utilized.

    Sets the assertion sources to use for prioritizing overlapping annotations when the 'source' ordering feature is utilized. This parameter contains a comma-separated list of assertion sources that drive the prioritization. Annotations will be prioritized based on the order of the given string.

    Definition Classes
    AssertionPrioritizationParams
  120. def setAssertionsConfidence(value: HashMap[String, Double]): AssertionMerger.this.type

    Sets pairs (assertion,confidenceThreshold) to filter assertions which have confidence lower than the confidence threshold.

  121. def setAssertionsConfidence(value: Map[String, Float]): AssertionMerger.this.type

    Sets pairs (assertion,confidenceThreshold) to filter assertions which have confidence lower than the confidence threshold.

  122. def setBlackList(list: String*): AssertionMerger.this.type
    Definition Classes
    WhiteAndBlackListParams
  123. def setBlackList(list: Array[String]): AssertionMerger.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
  124. def setCaseSensitive(value: Boolean): AssertionMerger.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
  125. def setDefault[T](feature: StructFeature[T], value: () ⇒ T): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  126. def setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  127. def setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  128. def setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  129. final def setDefault(paramPairs: ParamPair[_]*): AssertionMerger.this.type
    Attributes
    protected
    Definition Classes
    Params
  130. final def setDefault[T](param: Param[T], value: T): AssertionMerger.this.type
    Attributes
    protected[org.apache.spark.ml]
    Definition Classes
    Params
  131. def setDefaultConfidence(confidence: Float): AssertionMerger.this.type

    Sets the value to be used when the confidence value is included in the orderingFeatures and a given annotation does not have any confidence.

    Sets the value to be used when the confidence value is included in the orderingFeatures and a given annotation does not have any confidence. The default value is 0f.

    Definition Classes
    AssertionPrioritizationParams
  132. def setDenyList(list: String*): AssertionMerger.this.type
    Definition Classes
    WhiteAndBlackListParams
  133. def setDenyList(list: Array[String]): AssertionMerger.this.type
    Definition Classes
    WhiteAndBlackListParams
  134. def setInputCols(value: Array[String]): AssertionMerger.this.type

    Set input columns for the Annotator.

    Set input columns for the Annotator.

    Definition Classes
    AssertionMerger → HasInputAnnotationCols
  135. final def setInputCols(value: String*): AssertionMerger.this.type
    Definition Classes
    HasInputAnnotationCols
  136. def setLazyAnnotator(value: Boolean): AssertionMerger.this.type
    Definition Classes
    CanBeLazy
  137. def setMajorityVoting(value: Boolean): AssertionMerger.this.type

    Sets the value of the majorityVoting parameter.

    Sets the value of the majorityVoting parameter. It is used to resolve conflicts when there are more than 2 annotations in the same overlapping group. When confidence is used for ordering features, confidence values sum is used for majority voting.

  138. def setMergeOverlapping(v: Boolean): AssertionMerger.this.type

    Sets whether to merge overlapping matched assertion annotations.

    Sets whether to merge overlapping matched assertion annotations. Default: true

  139. def setOrderingFeatures(values: Array[String]): AssertionMerger.this.type

    Sets the array of strings specifying the ordering features to use for overlapping entities.

    Sets the array of strings specifying the ordering features to use for overlapping entities. Possible values are 'begin', 'end', 'length', 'source', 'confidence'. Default: Array("begin", "length", "source")

    Definition Classes
    AssertionPrioritizationParams
  140. final def setOutputCol(value: String): AssertionMerger.this.type
    Definition Classes
    HasOutputAnnotationCol
  141. def setParent(parent: Estimator[AssertionMerger]): AssertionMerger
    Definition Classes
    Model
  142. def setSelectionStrategy(strategy: String): AssertionMerger.this.type

    Sets the strategy for selecting annotations.

    Sets the strategy for selecting annotations.

    Annotations can be selected either sequentially based on their order (Sequential) or using a different strategy (DiverseLonger). Currently, only Sequential and DiverseLonger options are available. The default strategy is Sequential.

    Definition Classes
    AssertionPrioritizationParams
  143. def setSortByBegin(value: Boolean): AssertionMerger.this.type

    Sets whether to sort the annotations by begin at the end of the merge and filter process.

    Sets whether to sort the annotations by begin at the end of the merge and filter process. Default: false

  144. def setWhiteList(list: String*): AssertionMerger.this.type
    Definition Classes
    WhiteAndBlackListParams
  145. def setWhiteList(list: Array[String]): AssertionMerger.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
  146. val sortByBegin: BooleanParam

    Whether to sort the annotations by begin at the end of the merge and filter process.

    Whether to sort the annotations by begin at the end of the merge and filter process. Default: false

  147. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  148. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  149. final def transform(dataset: Dataset[_]): DataFrame
    Definition Classes
    AnnotatorModel → Transformer
  150. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  151. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  152. final def transformSchema(schema: StructType): StructType
    Definition Classes
    RawAnnotator → PipelineStage
  153. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  154. val uid: String
    Definition Classes
    AssertionMerger → Identifiable
  155. def validate(schema: StructType): Boolean
    Attributes
    protected
    Definition Classes
    AssertionMerger → RawAnnotator
  156. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  157. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  158. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  159. 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
  160. def wrapColumnMetadata(col: Column): Column
    Attributes
    protected
    Definition Classes
    RawAnnotator
  161. def write: MLWriter
    Definition Classes
    ParamsAndFeaturesWritable → DefaultParamsWritable → MLWritable

Inherited from WhiteAndBlackListParams

Inherited from HasSimpleAnnotate[AssertionMerger]

Inherited from AnnotatorModel[AssertionMerger]

Inherited from CanBeLazy

Inherited from RawAnnotator[AssertionMerger]

Inherited from HasOutputAnnotationCol

Inherited from HasInputAnnotationCols

Inherited from HasOutputAnnotatorType

Inherited from ParamsAndFeaturesWritable

Inherited from HasFeatures

Inherited from DefaultParamsWritable

Inherited from MLWritable

Inherited from Model[AssertionMerger]

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

Members

Parameter setters

Parameter getters