class SentenceEntityResolverModel extends nlp.annotators.resolution.SentenceEntityResolverModel

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
nlp.annotators.resolution.SentenceEntityResolverModel, CheckLicense, HasSafeAnnotate[nlp.annotators.resolution.SentenceEntityResolverModel], HandleExceptionParams, HasSimpleAnnotate[nlp.annotators.resolution.SentenceEntityResolverModel], HasEmbeddingsProperties, HasProtectedParams, HasStorageModel, HasStorageOptions, HasStorageReader, HasCaseSensitiveProperties, HasStorageRef, SentenceResolverParams, AnnotatorModel[nlp.annotators.resolution.SentenceEntityResolverModel], CanBeLazy, RawAnnotator[nlp.annotators.resolution.SentenceEntityResolverModel], HasOutputAnnotationCol, HasInputAnnotationCols, HasOutputAnnotatorType, ParamsAndFeaturesWritable, HasFeatures, DefaultParamsWritable, MLWritable, Model[nlp.annotators.resolution.SentenceEntityResolverModel], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. SentenceEntityResolverModel
  2. SentenceEntityResolverModel
  3. CheckLicense
  4. HasSafeAnnotate
  5. HandleExceptionParams
  6. HasSimpleAnnotate
  7. HasEmbeddingsProperties
  8. HasProtectedParams
  9. HasStorageModel
  10. HasStorageOptions
  11. HasStorageReader
  12. HasCaseSensitiveProperties
  13. HasStorageRef
  14. SentenceResolverParams
  15. AnnotatorModel
  16. CanBeLazy
  17. RawAnnotator
  18. HasOutputAnnotationCol
  19. HasInputAnnotationCols
  20. HasOutputAnnotatorType
  21. ParamsAndFeaturesWritable
  22. HasFeatures
  23. DefaultParamsWritable
  24. MLWritable
  25. Model
  26. Transformer
  27. PipelineStage
  28. Logging
  29. Params
  30. Serializable
  31. Serializable
  32. Identifiable
  33. AnyRef
  34. 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
    SentenceEntityResolverModelSentenceEntityResolverModel → HasSimpleAnnotate
  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. val auxLabelMap: StructFeature[Map[String, String]]

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

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

    Definition Classes
    SentenceEntityResolverModel
  14. 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
    SentenceEntityResolverModelSentenceEntityResolverModel → AnnotatorModel
  15. val caseSensitive: BooleanParam
    Definition Classes
    HasCaseSensitiveProperties
  16. final def checkSchema(schema: StructType, inputAnnotatorType: String): Boolean
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  17. def checkValidEnvironment(spark: Option[SparkSession], scopes: Seq[String]): Unit
    Definition Classes
    CheckLicense
  18. def checkValidScope(scope: String): Unit
    Definition Classes
    CheckLicense
  19. def checkValidScopeAndEnvironment(scope: String, spark: Option[SparkSession], checkLp: Boolean): Unit
    Definition Classes
    CheckLicense
  20. def checkValidScopesAndEnvironment(scopes: Seq[String], spark: Option[SparkSession], 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], blackList: Set[String], overwrite: Boolean = true): SerializableKDTree[TreeData]
    Definition Classes
    SentenceEntityResolverModel
  25. def copy(extra: ParamMap): nlp.annotators.resolution.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. val datasetInfo: Param[String]

    Descriptive information about the dataset being used.

    Descriptive information about the dataset being used.

    Definition Classes
    SentenceResolverParams
  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 doExceptionHandling: BooleanParam

    If true, exceptions are handled.

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

    Definition Classes
    HandleExceptionParams
  37. val enableInMemoryStorage: BooleanParam
    Definition Classes
    HasStorageOptions
  38. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  39. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  40. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  41. def explainParams(): String
    Definition Classes
    Params
  42. def extraValidate(structType: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  43. def extraValidateMsg: String
    Attributes
    protected
    Definition Classes
    RawAnnotator
  44. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  45. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  46. val features: ArrayBuffer[Feature[_, _, _]]
    Definition Classes
    HasFeatures
  47. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  48. def get[T](feature: StructFeature[T]): Option[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  49. def get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  50. def get[T](feature: SetFeature[T]): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  51. def get[T](feature: ArrayFeature[T]): Option[Array[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  52. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  53. def getAuxLabelMap(): Map[String, String]

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

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

    Definition Classes
    SentenceEntityResolverModel
  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. def getDatasetInfo: String

    get descriptive information about the dataset being used

    get descriptive information about the dataset being used

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

    Definition Classes
    SentenceEntityResolverModel
  72. 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.

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

    Whether to use Aux Label or not

    Whether to use Aux Label or not

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

    Input annotator types: SENTENCE_EMBEDDINGS

    Input annotator types: SENTENCE_EMBEDDINGS

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

    Output annotator types: ENTITY

    Output annotator types: ENTITY

    Definition Classes
    SentenceEntityResolverModel → HasOutputAnnotatorType
  113. final val outputCol: Param[String]
    Attributes
    protected
    Definition Classes
    HasOutputAnnotationCol
  114. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  115. var parent: Estimator[nlp.annotators.resolution.SentenceEntityResolverModel]
    Definition Classes
    Model
  116. val readers: Map[Name, StorageReader[_]]
    Attributes
    protected
    Definition Classes
    HasStorageReader
    Annotations
    @transient()
  117. val returnResolvedTextEmbeddings: BooleanParam

    Whether to include embeddings for resolved text embeddings.(Default : false)

    Whether to include embeddings for resolved text embeddings.(Default : false)

    Definition Classes
    SentenceEntityResolverModel
  118. def safeAnnotate(annotations: Seq[Annotation]): Seq[Annotation]

    A protected method designed to safely annotate a sequence of Annotation objects by handling exceptions.

    A protected method designed to safely annotate a sequence of Annotation objects by handling exceptions.

    annotations

    A sequence of Annotation.

    returns

    A sequence of Annotation objects after processing, potentially containing error annotations.

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

    Search Tree.

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

    Definition Classes
    SentenceEntityResolverModel
  122. def serializeStorage(path: String, spark: SparkSession): Unit
    Definition Classes
    HasStorageModel
  123. def set[T](param: ProtectedParam[T], value: T): SentenceEntityResolverModel.this.type
    Definition Classes
    HasProtectedParams
  124. def set[T](feature: StructFeature[T], value: T): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  125. def set[K, V](feature: MapFeature[K, V], value: Map[K, V]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  126. def set[T](feature: SetFeature[T], value: Set[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  127. def set[T](feature: ArrayFeature[T], value: Array[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  128. final def set(paramPair: ParamPair[_]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  129. final def set(param: String, value: Any): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  130. final def set[T](param: Param[T], value: T): SentenceEntityResolverModel.this.type
    Definition Classes
    Params
  131. def setAuxLabelMap(m: Map[String, String]): SentenceEntityResolverModel.this.type

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

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

    Definition Classes
    SentenceEntityResolverModel
  132. def setCaseSensitive(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasCaseSensitiveProperties
  133. def setConfidenceFunction(v: String): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  134. def setDatasetInfo(value: String): SentenceEntityResolverModel.this.type

    set descriptive information about the dataset being used

    set descriptive information about the dataset being used

    Definition Classes
    SentenceResolverParams
  135. def setDefault[T](feature: StructFeature[T], value: () ⇒ T): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  136. def setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  137. def setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  138. def setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  139. final def setDefault(paramPairs: ParamPair[_]*): SentenceEntityResolverModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  140. final def setDefault[T](param: Param[T], value: T): SentenceEntityResolverModel.this.type
    Attributes
    protected[org.apache.spark.ml]
    Definition Classes
    Params
  141. def setDimension(value: Int): SentenceEntityResolverModel.this.type
    Definition Classes
    HasEmbeddingsProperties
  142. def setDistanceFunction(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  143. def setDoExceptionHandling(value: Boolean): SentenceEntityResolverModel.this.type

    If true, exceptions are handled.

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

    Definition Classes
    HandleExceptionParams
  144. def setEnableInMemoryStorage(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasStorageOptions
  145. def setIncludeStorage(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    HasStorageOptions
  146. final def setInputCols(value: String*): SentenceEntityResolverModel.this.type
    Definition Classes
    HasInputAnnotationCols
  147. def setInputCols(value: Array[String]): SentenceEntityResolverModel.this.type
    Definition Classes
    HasInputAnnotationCols
  148. def setLazyAnnotator(value: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    CanBeLazy
  149. def setMissAsEmpty(v: Boolean): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  150. def setNeighbours(k: Int): SentenceEntityResolverModel.this.type
    Definition Classes
    SentenceResolverParams
  151. final def setOutputCol(value: String): SentenceEntityResolverModel.this.type
    Definition Classes
    HasOutputAnnotationCol
  152. def setParent(parent: Estimator[nlp.annotators.resolution.SentenceEntityResolverModel]): nlp.annotators.resolution.SentenceEntityResolverModel
    Definition Classes
    Model
  153. def setReturnResolvedTextEmbeddings(value: Boolean): SentenceEntityResolverModel.this.type

    Whether to include embeddings for resolved text embeddings.(Default : false)

    Whether to include embeddings for resolved text embeddings.(Default : false)

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

    Whether to use Aux Label or not

    Whether to use Aux Label or not

    Definition Classes
    SentenceEntityResolverModel
  158. val storageRef: Param[String]
    Definition Classes
    HasStorageRef
  159. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  160. val threshold: DoubleParam

    threshold value for the aggregated distance

    threshold value for the aggregated distance

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

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

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

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

Deprecated Value Members

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

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  2. 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.

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  3. 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.

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  4. 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)

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  5. 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)

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  6. 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)

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  7. 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.

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  8. 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

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  9. 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.

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated
  10. 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.

    Definition Classes
    SentenceEntityResolverModel
    Annotations
    @deprecated
    Deprecated

Inherited from CheckLicense

Inherited from HandleExceptionParams

Inherited from HasSimpleAnnotate[nlp.annotators.resolution.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 CanBeLazy

Inherited from HasOutputAnnotationCol

Inherited from HasInputAnnotationCols

Inherited from HasOutputAnnotatorType

Inherited from ParamsAndFeaturesWritable

Inherited from HasFeatures

Inherited from DefaultParamsWritable

Inherited from MLWritable

Inherited from Transformer

Inherited from PipelineStage

Inherited from Logging

Inherited from Params

Inherited from Serializable

Inherited from Serializable

Inherited from Identifiable

Inherited from AnyRef

Inherited from Any

Parameters

Members

Parameter setters

Parameter getters