class SentenceEntityResolverModel extends AnnotatorModel[SentenceEntityResolverModel] with SentenceResolverParams with HasStorageModel with HasEmbeddingsProperties with HasCaseSensitiveProperties with HasSimpleAnnotate[SentenceEntityResolverModel] with Licensed

The model transforms a dataset with Input Annotation type SENTENCE_EMBEDDINGS, coming from e.g. BertSentenceEmbeddings and returns the normalized entity for a particular trained ontology / curated dataset. (e.g. ICD-10, RxNorm, SNOMED etc.)

To use pretrained models please see the Models Hub for available models.

Example

Resolving CPT

First define pipeline stages to extract entities

val documentAssembler = new DocumentAssembler()
  .setInputCol("text")
  .setOutputCol("document")
val sentenceDetector = SentenceDetectorDLModel.pretrained()
  .setInputCols("document")
  .setOutputCol("sentence")
val tokenizer = new Tokenizer()
  .setInputCols("sentence")
  .setOutputCol("token")
val word_embeddings = WordEmbeddingsModel.pretrained("embeddings_clinical", "en", "clinical/models")
  .setInputCols("sentence", "token")
  .setOutputCol("embeddings")
val clinical_ner = MedicalNerModel.pretrained("jsl_ner_wip_clinical", "en", "clinical/models")
  .setInputCols("sentence", "token", "embeddings")
  .setOutputCol("ner")
val ner_converter = new NerConverter()
  .setInputCols("sentence", "token", "ner")
  .setOutputCol("ner_chunk")
  .setWhiteList("Test","Procedure")
val c2doc = new Chunk2Doc()
  .setInputCols("ner_chunk")
  .setOutputCol("ner_chunk_doc")
val sbert_embedder = BertSentenceEmbeddings
  .pretrained("sbiobert_base_cased_mli","en","clinical/models")
  .setInputCols("ner_chunk_doc")
  .setOutputCol("sbert_embeddings")

Then the resolver is defined on the extracted entities and sentence embeddings

val cpt_resolver = SentenceEntityResolverModel.pretrained("sbiobertresolve_cpt_procedures_augmented","en", "clinical/models")
  .setInputCols("ner_chunk", "sbert_embeddings")
  .setOutputCol("cpt_code")
  .setDistanceFunction("EUCLIDEAN")
val sbert_pipeline_cpt = new Pipeline().setStages(Array(
  documentAssembler,
  sentenceDetector,
  tokenizer,
  word_embeddings,
  clinical_ner,
  ner_converter,
  c2doc,
  sbert_embedder,
  cpt_resolver))

Show results

sbert_outputs
  .select("explode(arrays_zip(ner_chunk.result ,ner_chunk.metadata, cpt_code.result, cpt_code.metadata, ner_chunk.begin, ner_chunk.end)) as cpt_code")
  .selectExpr(
    "cpt_code['0'] as chunk",
    "cpt_code['1'].entity as entity",
    "cpt_code['2'] as code",
    "cpt_code['3'].confidence as confidence",
    "cpt_code['3'].all_k_resolutions as all_k_resolutions",
    "cpt_code['3'].all_k_results as all_k_results"
  ).show(5)
+--------------------+---------+-----+----------+--------------------+--------------------+
|               chunk|   entity| code|confidence|   all_k_resolutions|         all_k_codes|
+--------------------+---------+-----+----------+--------------------+--------------------+
|          heart cath|Procedure|93566|    0.1180|CCA - Cardiac cat...|93566:::62319:::9...|
|selective coronar...|     Test|93460|    0.1000|Coronary angiogra...|93460:::93458:::9...|
|common femoral an...|     Test|35884|    0.1808|Femoral artery by...|35884:::35883:::3...|
|   StarClose closure|Procedure|33305|    0.1197|Heart closure:::H...|33305:::33300:::3...|
|         stress test|     Test|93351|    0.2795|Cardiovascular st...|93351:::94621:::9...|
+--------------------+---------+-----+----------+--------------------+--------------------+
See also

SentenceEntityResolverApproach for training a custom model

Linear Supertypes
Licensed, HasSimpleAnnotate[SentenceEntityResolverModel], HasEmbeddingsProperties, HasStorageModel, HasExcludableStorage, HasStorageReader, HasCaseSensitiveProperties, HasStorageRef, SentenceResolverParams, AnnotatorModel[SentenceEntityResolverModel], CanBeLazy, RawAnnotator[SentenceEntityResolverModel], HasOutputAnnotationCol, HasInputAnnotationCols, HasOutputAnnotatorType, ParamsAndFeaturesWritable, HasFeatures, DefaultParamsWritable, MLWritable, Model[SentenceEntityResolverModel], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. SentenceEntityResolverModel
  2. Licensed
  3. HasSimpleAnnotate
  4. HasEmbeddingsProperties
  5. HasStorageModel
  6. HasExcludableStorage
  7. HasStorageReader
  8. HasCaseSensitiveProperties
  9. HasStorageRef
  10. SentenceResolverParams
  11. AnnotatorModel
  12. CanBeLazy
  13. RawAnnotator
  14. HasOutputAnnotationCol
  15. HasInputAnnotationCols
  16. HasOutputAnnotatorType
  17. ParamsAndFeaturesWritable
  18. HasFeatures
  19. DefaultParamsWritable
  20. MLWritable
  21. Model
  22. Transformer
  23. PipelineStage
  24. Logging
  25. Params
  26. Serializable
  27. Serializable
  28. Identifiable
  29. AnyRef
  30. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

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

    Resolves the ResolverLabel for the given array of TOKEN and WORD_EMBEDDINGS annotations

    Resolves the ResolverLabel for the given array of TOKEN and WORD_EMBEDDINGS annotations

    annotations

    an array of TOKEN and WORD_EMBEDDINGS Annotation objects coming from ChunkTokenizer and ChunkEmbeddings respectively

    returns

    an array of Annotation objects, with the result of the entity resolution for each chunk and the following metadata all_k_results -> Sorted ResolverLabels in the top alternatives that match the distance threshold all_k_resolutions -> Respective ResolverNormalized strings all_k_distances -> Respective distance values after aggregation all_k_wmd_distances -> Respective WMD distance values all_k_tfidf_distances -> Respective TFIDF Cosinge distance values all_k_jaccard_distances -> Respective Jaccard distance values all_k_sorensen_distances -> Respective SorensenDice distance values all_k_jaro_distances -> Respective JaroWinkler distance values all_k_levenshtein_distances -> Respective Levenshtein distance values all_k_confidences -> Respective normalized probabilities based in inverse distance values target_text -> The actual searched string resolved_text -> The top ResolverNormalized string confidence -> Top probability distance -> Top distance value sentence -> Sentence index chunk -> Chunk Index token -> Token index

    Definition Classes
    SentenceEntityResolverModel → HasSimpleAnnotate
  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. val auxLabelCol: Param[String]

    Optional column with one extra label per document.

    Optional column with one extra label per document. This extra label will be outputted later on in an additional column (Default: aux_label)

  14. val auxLabelMap: StructFeature[Map[String, String]]

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

  15. def beforeAnnotate(dataset: Dataset[_]): Dataset[_]

    validates the dataset before applying it further down the pipeline

    validates the dataset before applying it further down the pipeline

    Attributes
    protected
    Definition Classes
    SentenceEntityResolverModel → AnnotatorModel
  16. val caseSensitive: BooleanParam
    Definition Classes
    HasCaseSensitiveProperties
  17. final def checkSchema(schema: StructType, inputAnnotatorType: String): Boolean
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  18. final def clear(param: Param[_]): SentenceEntityResolverModel.this.type
    Definition Classes
    Params
  19. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  20. val confidenceFunction: Param[String]
    Definition Classes
    SentenceResolverParams
  21. def copy(extra: ParamMap): SentenceEntityResolverModel
    Definition Classes
    RawAnnotator → Model → Transformer → PipelineStage → Params
  22. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  23. def createDatabaseConnection(database: Name): RocksDBConnection
    Definition Classes
    HasStorageRef
  24. def createReader(database: Name, connection: RocksDBConnection): WordEmbeddingsReader

    creates WordEmbeddingsReader, based on the DB name and connection

    creates WordEmbeddingsReader, based on the DB name and connection

    database

    Name of the desired database

    connection

    Connection to the RocksDB

    returns

    The instance of the class WordEmbeddingsReader

    Attributes
    protected
    Definition Classes
    SentenceEntityResolverModel → HasStorageReader
  25. val databases: Array[Name]

    This cannot hold EMBEDDINGS since otherwise ER will try to re-save and read embeddings again

    This cannot hold EMBEDDINGS since otherwise ER will try to re-save and read embeddings again

    Attributes
    protected
    Definition Classes
    SentenceEntityResolverModel → HasStorageModel
  26. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  27. def deserializeStorage(path: String, spark: SparkSession): Unit
    Definition Classes
    HasStorageModel
  28. def dfAnnotate: UserDefinedFunction
    Definition Classes
    HasSimpleAnnotate
  29. val dimension: IntParam
    Definition Classes
    HasEmbeddingsProperties
  30. val distanceFunction: Param[String]

    what distance function to use for KNN: 'EUCLIDEAN' or 'COSINE'

    what distance function to use for KNN: 'EUCLIDEAN' or 'COSINE'

    Definition Classes
    SentenceResolverParams
  31. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  33. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  34. def explainParams(): String
    Definition Classes
    Params
  35. def extraValidate(structType: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  36. def extraValidateMsg: String
    Attributes
    protected
    Definition Classes
    RawAnnotator
  37. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  38. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  39. val features: ArrayBuffer[Feature[_, _, _]]
    Definition Classes
    HasFeatures
  40. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  41. def get[T](feature: StructFeature[T]): Option[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  42. def get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  43. def get[T](feature: SetFeature[T]): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  44. def get[T](feature: ArrayFeature[T]): Option[Array[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  45. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  46. def getAuxLabelCol(): String

    Optional column with one extra label per document.

    Optional column with one extra label per document. This extra label will be outputted later on in an additional column.

  47. def getAuxLabelMap(): Map[String, String]

    Map[String,String] where key=label and value=auxLabel from a dataset.

  48. def getCaseSensitive: Boolean
    Definition Classes
    HasCaseSensitiveProperties
  49. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  50. def getConfidenceFunction: String
    Definition Classes
    SentenceResolverParams
  51. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  52. def getDimension: Int
    Definition Classes
    HasEmbeddingsProperties
  53. def getDistanceFunction: String
    Definition Classes
    SentenceResolverParams
  54. def getIncludeStorage: Boolean
    Definition Classes
    HasExcludableStorage
  55. def getInputCols: Array[String]
    Definition Classes
    HasInputAnnotationCols
  56. def getLazyAnnotator: Boolean
    Definition Classes
    CanBeLazy
  57. def getMissAsEmpty: Boolean
    Definition Classes
    SentenceResolverParams
  58. def getNeighbours: Int
    Definition Classes
    SentenceResolverParams
  59. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  60. final def getOutputCol: String
    Definition Classes
    HasOutputAnnotationCol
  61. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  62. def getReader[A](database: Name): StorageReader[A]
    Attributes
    protected
    Definition Classes
    HasStorageReader
  63. def getReturnAllKEmbeddings(): Boolean

    Whether to return all embeddings of all K candidates of the resolution.

    Whether to return all embeddings of all K candidates of the resolution. Embeddings will be in the metadata. Increase in RAM usage to be expected

  64. def getReturnCosineDistances: Boolean

    Whether to calculate and return cosine distances between a chunk/token and the k closest candidates.

    Whether to calculate and return cosine distances between a chunk/token and the k closest candidates. Can improve accuracy but increases computation.

  65. def getReturnEuclideanDistances: Boolean

    Whether to Euclidean distances of the k closest candidates for a chunk/token.

  66. def getSearchTree: SerializableKDTree[TreeData]
  67. def getStorageRef: String
    Definition Classes
    HasStorageRef
  68. def getThreshold: Double
    Definition Classes
    SentenceResolverParams
  69. def getUseAuxLabel(): Boolean

    Whether to use Aux Label or not

  70. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  71. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  72. def hasParent: Boolean
    Definition Classes
    Model
  73. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  74. val includeStorage: BooleanParam
    Definition Classes
    HasExcludableStorage
  75. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  76. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  77. val inputAnnotatorTypes: Array[String]

    Input annotator types: SENTENCE_EMBEDDINGS

    Input annotator types: SENTENCE_EMBEDDINGS

    Definition Classes
    SentenceEntityResolverModel → HasInputAnnotationCols
  78. final val inputCols: StringArrayParam
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  79. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  80. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  81. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  82. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  83. val lazyAnnotator: BooleanParam
    Definition Classes
    CanBeLazy
  84. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  85. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  86. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  87. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  88. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  89. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  90. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  91. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  92. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  93. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  94. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  95. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  96. val missAsEmpty: BooleanParam

    whether or not to return an empty annotation on unmatched chunks

    whether or not to return an empty annotation on unmatched chunks

    Definition Classes
    SentenceResolverParams
  97. def msgHelper(schema: StructType): String
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  98. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  99. val neighbours: IntParam

    number of neighbours to consider in the KNN query to calculate WMD

    number of neighbours to consider in the KNN query to calculate WMD

    Definition Classes
    SentenceResolverParams
  100. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  101. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  102. def onWrite(path: String, spark: SparkSession): Unit
    Attributes
    protected
    Definition Classes
    HasStorageModel → ParamsAndFeaturesWritable
  103. val outputAnnotatorType: AnnotatorType

    Output annotator types: ENTITY

    Output annotator types: ENTITY

    Definition Classes
    SentenceEntityResolverModel → HasOutputAnnotatorType
  104. final val outputCol: Param[String]
    Attributes
    protected
    Definition Classes
    HasOutputAnnotationCol
  105. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  106. var parent: Estimator[SentenceEntityResolverModel]
    Definition Classes
    Model
  107. val readers: Map[Name, StorageReader[_]]
    Attributes
    protected
    Definition Classes
    HasStorageReader
    Annotations
    @transient()
  108. val returnAllKEmbeddings: BooleanParam

    Whether to return all embeddings of all K candidates of the resolution.

    Whether to return all embeddings of all K candidates of the resolution. Embeddings will be in the metadata. Increase in RAM usage to be expected (Default: false)

  109. val returnCosineDistances: BooleanParam

    Whether to calculate and return cosine distances between a chunk/token and the k closest candidates.

    Whether to calculate and return cosine distances between a chunk/token and the k closest candidates. Can improve accuracy but increases computation (Default: true)

  110. val returnEuclideanDistances: BooleanParam

    Whether to Euclidean distances of the k closest candidates for a chunk/token (Default: true)

  111. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  112. def saveStorage(path: String, spark: SparkSession, withinStorage: Boolean): Unit
    Definition Classes
    HasStorageModel
  113. val searchTree: StructFeature_HadoopFix[SerializableKDTree[TreeData]]

    Search Tree.

    Search Tree. Under the hood encapsulates SerializableKDTree. Used to perform the search

  114. def serializeStorage(path: String, spark: SparkSession): Unit
    Definition Classes
    HasStorageModel
  115. def set[T](feature: StructFeature[T], value: T): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  116. def set[K, V](feature: MapFeature[K, V], value: Map[K, V]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  117. def set[T](feature: SetFeature[T], value: Set[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  118. def set[T](feature: ArrayFeature[T], value: Array[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  119. final def set(paramPair: ParamPair[_]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  120. final def set(param: String, value: Any): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  121. final def set[T](param: Param[T], value: T): SentenceEntityResolverModel.this.type
    Definition Classes
    Params
  122. def setAuxLabelCol(c: String): SentenceEntityResolverModel.this.type

    Optional column with one extra label per document.

    Optional column with one extra label per document. This extra label will be outputted later on in an additional column.

  123. def setAuxLabelMap(m: Map[String, String]): SentenceEntityResolverModel.this.type

    Map[String,String] where key=label and value=auxLabel from a dataset.

  124. def setCaseSensitive(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasCaseSensitiveProperties
  125. def setConfidenceFunction(v: String): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  126. def setDefault[T](feature: StructFeature[T], value: () ⇒ T): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  127. def setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  128. def setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  129. def setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  130. final def setDefault(paramPairs: ParamPair[_]*): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  131. final def setDefault[T](param: Param[T], value: T): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  132. def setDimension(value: Int): SentenceEntityResolverModel.this.type
    Definition Classes
    HasEmbeddingsProperties
  133. def setDistanceFunction(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  134. def setIncludeStorage(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasExcludableStorage
  135. final def setInputCols(value: String*): SentenceEntityResolverModel.this.type
    Definition Classes
    HasInputAnnotationCols
  136. final def setInputCols(value: Array[String]): SentenceEntityResolverModel.this.type
    Definition Classes
    HasInputAnnotationCols
  137. def setLazyAnnotator(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    CanBeLazy
  138. def setMissAsEmpty(v: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  139. def setNeighbours(k: Int): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  140. final def setOutputCol(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    HasOutputAnnotationCol
  141. def setParent(parent: Estimator[SentenceEntityResolverModel]): SentenceEntityResolverModel
    Definition Classes
    Model
  142. def setReturnAllKEmbeddings(b: Boolean): SentenceEntityResolverModel.this.type

    Whether to return all embeddings of all K candidates of the resolution.

    Whether to return all embeddings of all K candidates of the resolution. Embeddings will be in the metadata. Increase in RAM usage to be expected

  143. def setReturnCosineDistances(value: Boolean): SentenceEntityResolverModel.this.type

    Whether to calculate and return cosine distances between a chunk/token and the k closest candidates.

    Whether to calculate and return cosine distances between a chunk/token and the k closest candidates. Can improve accuracy but increases computation.

  144. def setReturnEuclideanDistances(value: Boolean): SentenceEntityResolverModel.this.type

    Whether to Euclidean distances of the k closest candidates for a chunk/token.

  145. def setSearchTree(tree: SerializableKDTree[TreeData]): SentenceEntityResolverModel.this.type
  146. def setStorageRef(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    HasStorageRef
  147. def setThreshold(dist: Double): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  148. def setUseAuxLabel(b: Boolean): SentenceEntityResolverModel.this.type

    Whether to use Aux Label or not

  149. val storageRef: Param[String]
    Definition Classes
    HasStorageRef
  150. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  151. val threshold: DoubleParam

    threshold value for the aggregated distance

    threshold value for the aggregated distance

    Definition Classes
    SentenceResolverParams
  152. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  153. final def transform(dataset: Dataset[_]): DataFrame
    Definition Classes
    AnnotatorModel → Transformer
  154. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  155. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  156. final def transformSchema(schema: StructType): StructType
    Definition Classes
    RawAnnotator → PipelineStage
  157. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  158. val uid: String
    Definition Classes
    SentenceEntityResolverModel → Identifiable
  159. val useAuxLabel: BooleanParam

    Whether to use Aux Label or not (Default: false)

  160. def validate(schema: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  161. def validateStorageRef(dataset: Dataset[_], inputCols: Array[String], annotatorType: String): Unit
    Definition Classes
    HasStorageRef
  162. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  163. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  164. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  165. def wrapColumnMetadata(col: Column): Column
    Attributes
    protected
    Definition Classes
    RawAnnotator
  166. def wrapEmbeddingsMetadata(col: Column, embeddingsDim: Int, embeddingsRef: Option[String]): Column
    Attributes
    protected
    Definition Classes
    HasEmbeddingsProperties
  167. def wrapSentenceEmbeddingsMetadata(col: Column, embeddingsDim: Int, embeddingsRef: Option[String]): Column
    Attributes
    protected
    Definition Classes
    HasEmbeddingsProperties
  168. def write: MLWriter
    Definition Classes
    ParamsAndFeaturesWritable → DefaultParamsWritable → MLWritable

Inherited from Licensed

Inherited from HasSimpleAnnotate[SentenceEntityResolverModel]

Inherited from HasEmbeddingsProperties

Inherited from HasStorageModel

Inherited from HasExcludableStorage

Inherited from HasStorageReader

Inherited from HasCaseSensitiveProperties

Inherited from HasStorageRef

Inherited from SentenceResolverParams

Inherited from AnnotatorModel[SentenceEntityResolverModel]

Inherited from CanBeLazy

Inherited from RawAnnotator[SentenceEntityResolverModel]

Inherited from HasOutputAnnotationCol

Inherited from HasInputAnnotationCols

Inherited from HasOutputAnnotatorType

Inherited from ParamsAndFeaturesWritable

Inherited from HasFeatures

Inherited from DefaultParamsWritable

Inherited from MLWritable

Inherited from Model[SentenceEntityResolverModel]

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