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("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, HasProtectedParams, HasStorageModel, HasStorageOptions, 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. HasProtectedParams
  6. HasStorageModel
  7. HasStorageOptions
  8. HasStorageReader
  9. HasCaseSensitiveProperties
  10. HasStorageRef
  11. SentenceResolverParams
  12. AnnotatorModel
  13. CanBeLazy
  14. RawAnnotator
  15. HasOutputAnnotationCol
  16. HasInputAnnotationCols
  17. HasOutputAnnotatorType
  18. ParamsAndFeaturesWritable
  19. HasFeatures
  20. DefaultParamsWritable
  21. MLWritable
  22. Model
  23. Transformer
  24. PipelineStage
  25. Logging
  26. Params
  27. Serializable
  28. Serializable
  29. Identifiable
  30. AnyRef
  31. 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
  3. implicit class ProtectedParam[T] extends Param[T]
    Definition Classes
    HasProtectedParams

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

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

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

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

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

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

    Whether to use Aux Label or not

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

    Input annotator types: SENTENCE_EMBEDDINGS

    Input annotator types: SENTENCE_EMBEDDINGS

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

    Output annotator types: ENTITY

    Output annotator types: ENTITY

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

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

    Search Tree.

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

  119. def serializeStorage(path: String, spark: SparkSession): Unit
    Definition Classes
    HasStorageModel
  120. def set[T](param: ProtectedParam[T], value: T): SentenceEntityResolverModel.this.type
    Definition Classes
    HasProtectedParams
  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 setEnableInMemoryStorage(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasStorageOptions
  141. def setIncludeStorage(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasStorageOptions
  142. final def setInputCols(value: String*): SentenceEntityResolverModel.this.type
    Definition Classes
    HasInputAnnotationCols
  143. def setInputCols(value: Array[String]): SentenceEntityResolverModel.this.type
    Definition Classes
    HasInputAnnotationCols
  144. def setLazyAnnotator(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    CanBeLazy
  145. def setMissAsEmpty(v: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  146. def setNeighbours(k: Int): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  147. final def setOutputCol(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    HasOutputAnnotationCol
  148. def setParent(parent: Estimator[SentenceEntityResolverModel]): SentenceEntityResolverModel
    Definition Classes
    Model
  149. 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

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

    Whether to use Aux Label or not

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

    threshold value for the aggregated distance

    threshold value for the aggregated distance

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

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

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

Deprecated Value Members

  1. def getReturnEuclideanDistances: Boolean

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

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

    Annotations
    @deprecated
    Deprecated
  2. 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)

    Annotations
    @deprecated
    Deprecated
  3. val returnEuclideanDistances: BooleanParam

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

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

    Annotations
    @deprecated
    Deprecated
  4. 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.

    Annotations
    @deprecated
    Deprecated
  5. def setReturnEuclideanDistances(value: Boolean): SentenceEntityResolverModel.this.type

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

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

    Annotations
    @deprecated
    Deprecated

Inherited from CheckLicense

Inherited from HasSimpleAnnotate[SentenceEntityResolverModel]

Inherited from HasEmbeddingsProperties

Inherited from HasProtectedParams

Inherited from HasStorageModel

Inherited from HasStorageOptions

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