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

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
CheckLicense, 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. CheckLicense
  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. def checkValidEnvironment(spark: Option[SparkContext]): Unit
    Definition Classes
    CheckLicense
  19. def checkValidScope(scope: String): Unit
    Definition Classes
    CheckLicense
  20. def checkValidScopeAndEnvironment(scope: String, spark: Option[SparkContext], checkLp: Boolean): Unit
    Definition Classes
    CheckLicense
  21. final def clear(param: Param[_]): SentenceEntityResolverModel.this.type
    Definition Classes
    Params
  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  23. val confidenceFunction: Param[String]
    Definition Classes
    SentenceResolverParams
  24. def continueTraining(newKeys: Array[Array[Float]], newData: Array[TreeData], overwrite: Boolean = true): SerializableKDTree[TreeData]
  25. def copy(extra: ParamMap): SentenceEntityResolverModel
    Definition Classes
    RawAnnotator → Model → Transformer → PipelineStage → Params
  26. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  27. def createDatabaseConnection(database: Name): RocksDBConnection
    Definition Classes
    HasStorageRef
  28. 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
  29. 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
  30. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  31. def deserializeStorage(path: String, spark: SparkSession): Unit
    Definition Classes
    HasStorageModel
  32. def dfAnnotate: UserDefinedFunction
    Definition Classes
    HasSimpleAnnotate
  33. val dimension: IntParam
    Definition Classes
    HasEmbeddingsProperties
  34. 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
  35. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  37. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  38. def explainParams(): String
    Definition Classes
    Params
  39. def extraValidate(structType: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  40. def extraValidateMsg: String
    Attributes
    protected
    Definition Classes
    RawAnnotator
  41. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  42. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  43. val features: ArrayBuffer[Feature[_, _, _]]
    Definition Classes
    HasFeatures
  44. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  45. def get[T](feature: StructFeature[T]): Option[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  46. def get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  47. def get[T](feature: SetFeature[T]): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  48. def get[T](feature: ArrayFeature[T]): Option[Array[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  49. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  50. 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.

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

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

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

  68. 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.

  69. def getReturnEuclideanDistances: Boolean

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

  70. def getSearchTree: SerializableKDTree[TreeData]
  71. def getStorageRef: String
    Definition Classes
    HasStorageRef
  72. def getThreshold: Double
    Definition Classes
    SentenceResolverParams
  73. def getUseAuxLabel(): Boolean

    Whether to use Aux Label or not

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

    Input annotator types: SENTENCE_EMBEDDINGS

    Input annotator types: SENTENCE_EMBEDDINGS

    Definition Classes
    SentenceEntityResolverModel → HasInputAnnotationCols
  82. final val inputCols: StringArrayParam
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  83. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  84. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  85. def isLp(): Boolean
    Definition Classes
    CheckLicense
  86. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  87. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  88. val lazyAnnotator: BooleanParam
    Definition Classes
    CanBeLazy
  89. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  90. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  91. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  92. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  93. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  94. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  95. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  96. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  97. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  98. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  99. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  100. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  101. 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
  102. def msgHelper(schema: StructType): String
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  103. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  104. 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
  105. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  106. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  107. def onWrite(path: String, spark: SparkSession): Unit
    Attributes
    protected
    Definition Classes
    HasStorageModel → ParamsAndFeaturesWritable
  108. val optionalInputAnnotatorTypes: Array[String]
    Definition Classes
    HasInputAnnotationCols
  109. val outputAnnotatorType: AnnotatorType

    Output annotator types: ENTITY

    Output annotator types: ENTITY

    Definition Classes
    SentenceEntityResolverModel → HasOutputAnnotatorType
  110. final val outputCol: Param[String]
    Attributes
    protected
    Definition Classes
    HasOutputAnnotationCol
  111. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  112. var parent: Estimator[SentenceEntityResolverModel]
    Definition Classes
    Model
  113. val readers: Map[Name, StorageReader[_]]
    Attributes
    protected
    Definition Classes
    HasStorageReader
    Annotations
    @transient()
  114. 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)

  115. 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)

  116. val returnEuclideanDistances: BooleanParam

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

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

    Search Tree.

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

  120. def serializeStorage(path: String, spark: SparkSession): Unit
    Definition Classes
    HasStorageModel
  121. def set[T](feature: StructFeature[T], value: T): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  122. def set[K, V](feature: MapFeature[K, V], value: Map[K, V]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  123. def set[T](feature: SetFeature[T], value: Set[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  124. def set[T](feature: ArrayFeature[T], value: Array[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  125. final def set(paramPair: ParamPair[_]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  126. final def set(param: String, value: Any): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  127. final def set[T](param: Param[T], value: T): SentenceEntityResolverModel.this.type
    Definition Classes
    Params
  128. 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.

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

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

  130. def setCaseSensitive(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasCaseSensitiveProperties
  131. def setConfidenceFunction(v: String): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  132. def setDefault[T](feature: StructFeature[T], value: () ⇒ T): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  133. def setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  134. def setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  135. def setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  136. final def setDefault(paramPairs: ParamPair[_]*): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  137. final def setDefault[T](param: Param[T], value: T): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  138. def setDimension(value: Int): SentenceEntityResolverModel.this.type
    Definition Classes
    HasEmbeddingsProperties
  139. def setDistanceFunction(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  140. def setIncludeStorage(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasExcludableStorage
  141. final def setInputCols(value: String*): SentenceEntityResolverModel.this.type
    Definition Classes
    HasInputAnnotationCols
  142. final def setInputCols(value: Array[String]): SentenceEntityResolverModel.this.type
    Definition Classes
    HasInputAnnotationCols
  143. def setLazyAnnotator(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    CanBeLazy
  144. def setMissAsEmpty(v: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  145. def setNeighbours(k: Int): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  146. final def setOutputCol(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    HasOutputAnnotationCol
  147. def setParent(parent: Estimator[SentenceEntityResolverModel]): SentenceEntityResolverModel
    Definition Classes
    Model
  148. 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

  149. 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.

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

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

  151. def setSearchTree(tree: SerializableKDTree[TreeData]): SentenceEntityResolverModel.this.type
  152. def setStorageRef(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    HasStorageRef
  153. def setThreshold(dist: Double): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  154. def setUseAuxLabel(b: Boolean): SentenceEntityResolverModel.this.type

    Whether to use Aux Label or not

  155. val storageRef: Param[String]
    Definition Classes
    HasStorageRef
  156. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  157. val threshold: DoubleParam

    threshold value for the aggregated distance

    threshold value for the aggregated distance

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

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

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

Inherited from CheckLicense

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