c

com.johnsnowlabs.nlp.annotators.deid

ObfuscatorAnnotatorModel

class ObfuscatorAnnotatorModel extends AnnotatorModel[ObfuscatorAnnotatorModel] with ObfuscatorParams with DeidModelParams with HasSimpleAnnotate[ObfuscatorAnnotatorModel]

Linear Supertypes
HasSimpleAnnotate[ObfuscatorAnnotatorModel], DeidModelParams, ObfuscatorParams, BaseDeidParams, AnnotatorModel[ObfuscatorAnnotatorModel], CanBeLazy, RawAnnotator[ObfuscatorAnnotatorModel], HasOutputAnnotationCol, HasInputAnnotationCols, HasOutputAnnotatorType, ParamsAndFeaturesWritable, HasFeatures, DefaultParamsWritable, MLWritable, Model[ObfuscatorAnnotatorModel], Transformer, PipelineStage, Logging, Params, Serializable, Serializable, Identifiable, AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. ObfuscatorAnnotatorModel
  2. HasSimpleAnnotate
  3. DeidModelParams
  4. ObfuscatorParams
  5. BaseDeidParams
  6. AnnotatorModel
  7. CanBeLazy
  8. RawAnnotator
  9. HasOutputAnnotationCol
  10. HasInputAnnotationCols
  11. HasOutputAnnotatorType
  12. ParamsAndFeaturesWritable
  13. HasFeatures
  14. DefaultParamsWritable
  15. MLWritable
  16. Model
  17. Transformer
  18. PipelineStage
  19. Logging
  20. Params
  21. Serializable
  22. Serializable
  23. Identifiable
  24. AnyRef
  25. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ObfuscatorAnnotatorModel()
  2. new ObfuscatorAnnotatorModel(uid: String)

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. val ageRanges: IntArrayParam

    List of integers specifying limits of the age groups to preserve during obfuscation

    List of integers specifying limits of the age groups to preserve during obfuscation

    Definition Classes
    BaseDeidParams
  12. val allTerms: SetFeature[String]
  13. def annotate(annotations: Seq[Annotation]): Seq[Annotation]
    Definition Classes
    ObfuscatorAnnotatorModel → HasSimpleAnnotate
  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. def beforeAnnotate(dataset: Dataset[_]): Dataset[_]
    Attributes
    protected
    Definition Classes
    AnnotatorModel
  16. final def checkSchema(schema: StructType, inputAnnotatorType: String): Boolean
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  17. final def clear(param: Param[_]): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    Params
  18. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  19. def copy(extra: ParamMap): ObfuscatorAnnotatorModel
    Definition Classes
    RawAnnotator → Model → Transformer → PipelineStage → Params
  20. def copyValues[T <: Params](to: T, extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  21. val dateFormats: StringArrayParam

    Format of dates to displace

    Format of dates to displace

    Definition Classes
    BaseDeidParams
  22. val days: IntParam

    Number of days to obfuscate the dates by displacement.

    Number of days to obfuscate the dates by displacement. If not provided a random integer between 1 and 60 will be used

    Definition Classes
    BaseDeidParams
  23. final def defaultCopy[T <: Params](extra: ParamMap): T
    Attributes
    protected
    Definition Classes
    Params
  24. def dfAnnotate: UserDefinedFunction
    Definition Classes
    HasSimpleAnnotate
  25. val entity: Param[String]
    Definition Classes
    ObfuscatorParams
  26. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  27. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  28. def explainParam(param: Param[_]): String
    Definition Classes
    Params
  29. def explainParams(): String
    Definition Classes
    Params
  30. def extraValidate(structType: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  31. def extraValidateMsg: String
    Attributes
    protected
    Definition Classes
    RawAnnotator
  32. final def extractParamMap(): ParamMap
    Definition Classes
    Params
  33. final def extractParamMap(extra: ParamMap): ParamMap
    Definition Classes
    Params
  34. val features: ArrayBuffer[Feature[_, _, _]]
    Definition Classes
    HasFeatures
  35. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  36. val genderAwareness: BooleanParam

    Whether to use gender-aware names or not during obfuscation.

    Whether to use gender-aware names or not during obfuscation. This param effects only names. If value is true, it might decrease performance. Default: False

    Definition Classes
    BaseDeidParams
  37. def generateFakeBySameLength(wordToReplace: String, entity: String): String

    obfuscating digits to new digits, letters to new letters and others remains the same

    obfuscating digits to new digits, letters to new letters and others remains the same

    Definition Classes
    DeidModelParams
  38. def generateFakeBySameLengthUsingHash(wordToReplace: String, entity: String): String
    Attributes
    protected
    Definition Classes
    DeidModelParams
  39. def get[T](feature: StructFeature[T]): Option[T]
    Attributes
    protected
    Definition Classes
    HasFeatures
  40. def get[K, V](feature: MapFeature[K, V]): Option[Map[K, V]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  41. def get[T](feature: SetFeature[T]): Option[Set[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  42. def get[T](feature: ArrayFeature[T]): Option[Array[T]]
    Attributes
    protected
    Definition Classes
    HasFeatures
  43. final def get[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  44. def getAllTerms: Set[String]
  45. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  46. def getDateFormats: Array[String]
    Definition Classes
    BaseDeidParams
  47. def getDays: Int
    Definition Classes
    BaseDeidParams
  48. final def getDefault[T](param: Param[T]): Option[T]
    Definition Classes
    Params
  49. def getFakeByHashcode(fakes: Seq[String], wordToReplace: String, entity: String, seed: Int): String
    Attributes
    protected
    Definition Classes
    DeidModelParams
  50. def getFakersEntity(entity: String, result: String): Seq[String]
    Definition Classes
    DeidModelParams
  51. def getInputCols: Array[String]
    Definition Classes
    HasInputAnnotationCols
  52. def getLanguage: String
    Definition Classes
    BaseDeidParams
  53. def getLazyAnnotator: Boolean
    Definition Classes
    CanBeLazy
  54. def getObfuscateRefSource: String
    Definition Classes
    BaseDeidParams
  55. final def getOrDefault[T](param: Param[T]): T
    Definition Classes
    Params
  56. final def getOutputCol: String
    Definition Classes
    HasOutputAnnotationCol
  57. def getParam(paramName: String): Param[Any]
    Definition Classes
    Params
  58. def getSameLengthFormattedEntities(): Array[String]
    Definition Classes
    BaseDeidParams
  59. def getSeed(): Int
    Definition Classes
    BaseDeidParams
  60. def getValidAgeRanges: Array[Int]

    Gets valid ageRanges whether ageRangesByHipaa is true or not.

    Gets valid ageRanges whether ageRangesByHipaa is true or not.

    Attributes
    protected
    Definition Classes
    ObfuscatorAnnotatorModelDeidModelParams
  61. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  62. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  63. def hasParent: Boolean
    Definition Classes
    Model
  64. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  65. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  66. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  67. val inputAnnotatorTypes: Array[AnnotatorType]
    Definition Classes
    ObfuscatorAnnotatorModel → HasInputAnnotationCols
  68. final val inputCols: StringArrayParam
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  69. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  70. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  71. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  72. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  73. val language: Param[String]

    The language used to select the regex file and some faker entities.

    The language used to select the regex file and some faker entities. 'en'(English),'de'(German), 'es'(Spanish), 'fr'(French), 'ar'(Arabic) or 'ro'(Romanian) Default:'en'

    Definition Classes
    BaseDeidParams
  74. val lazyAnnotator: BooleanParam
    Definition Classes
    CanBeLazy
  75. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  76. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  77. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  78. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  79. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  80. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  81. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  82. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  83. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  84. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  85. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  86. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  87. def msgHelper(schema: StructType): String
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  88. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  89. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  90. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  91. val obfuscateRefSource: Param[String]

    The source of obfuscation to obfuscate the entities.

    The source of obfuscation to obfuscate the entities. The values ar the following: 'file': Takes the entities from the obfuscatorRefFile 'faker': Takes the entities from the Faker module 'both': Takes the entities from the obfuscatorRefFile and the faker module randomly.

    Definition Classes
    BaseDeidParams
  92. def onWrite(path: String, spark: SparkSession): Unit
    Attributes
    protected
    Definition Classes
    ParamsAndFeaturesWritable
  93. val optionalInputAnnotatorTypes: Array[String]
    Definition Classes
    HasInputAnnotationCols
  94. val outputAnnotatorType: AnnotatorType
    Definition Classes
    ObfuscatorAnnotatorModel → HasOutputAnnotatorType
  95. final val outputCol: Param[String]
    Attributes
    protected
    Definition Classes
    HasOutputAnnotationCol
  96. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  97. var parent: Estimator[ObfuscatorAnnotatorModel]
    Definition Classes
    Model
  98. val random: SecureRandom
    Attributes
    protected
    Definition Classes
    DeidModelParams
  99. val sameLengthFormattedEntities: StringArrayParam

    List of formatted entities to generate the same length outputs as original ones during obfuscation.

    List of formatted entities to generate the same length outputs as original ones during obfuscation. The supported and default formatted entities are: "phone", "fax", "id", "idnum", "bioid", "medicalrecord", "zip", "vin", "ssn", "dln", "plate", "license", "IRS", "CFN".

    Definition Classes
    BaseDeidParams
  100. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  101. val seed: IntParam

    It is the seed to select the entities on obfuscate mode.

    It is the seed to select the entities on obfuscate mode. With the seed, you can reply to an execution several times with the same output.

    Definition Classes
    BaseDeidParams
  102. def set[T](feature: StructFeature[T], value: T): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  103. def set[K, V](feature: MapFeature[K, V], value: Map[K, V]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  104. def set[T](feature: SetFeature[T], value: Set[T]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  105. def set[T](feature: ArrayFeature[T], value: Array[T]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  106. final def set(paramPair: ParamPair[_]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  107. final def set(param: String, value: Any): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  108. final def set[T](param: Param[T], value: T): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    Params
  109. def setAgeRanges(mode: Array[Int]): ObfuscatorAnnotatorModel.this.type

    List of integers specifying limits of the age groups to preserve during obfuscation

    List of integers specifying limits of the age groups to preserve during obfuscation

    Definition Classes
    BaseDeidParams
  110. def setAllTerms(value: Set[String]): ObfuscatorAnnotatorModel.this.type
  111. def setDateFormats(s: Array[String]): ObfuscatorAnnotatorModel.this.type

    Format of dates to displace

    Format of dates to displace

    Definition Classes
    BaseDeidParams
  112. def setDays(k: Int): ObfuscatorAnnotatorModel.this.type

    Number of days to obfuscate the dates by displacement.

    Number of days to obfuscate the dates by displacement. If not provided a random integer between 1 and 60 will be used

    Definition Classes
    BaseDeidParams
  113. def setDefault[T](feature: StructFeature[T], value: () ⇒ T): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  114. def setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  115. def setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  116. def setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  117. final def setDefault(paramPairs: ParamPair[_]*): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  118. final def setDefault[T](param: Param[T], value: T): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  119. def setEntity(e: String): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    ObfuscatorParams
  120. def setGenderAwareness(value: Boolean): ObfuscatorAnnotatorModel.this.type

    Whether to use gender-aware names or not during obfuscation.

    Whether to use gender-aware names or not during obfuscation. This param effects only names. If value is true, it might decrease performance. Default: False

    Definition Classes
    BaseDeidParams
  121. final def setInputCols(value: String*): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    HasInputAnnotationCols
  122. def setInputCols(value: Array[String]): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    HasInputAnnotationCols
  123. def setLanguage(s: String): ObfuscatorAnnotatorModel.this.type

    The language used to select the regex file and some faker entities.

    The language used to select the regex file and some faker entities. 'en'(English),'de'(German), 'es'(Spanish), 'fr'(French), 'ar'(Arabic) or 'ro'(Romanian). Default:'en'

    Definition Classes
    BaseDeidParams
  124. def setLazyAnnotator(value: Boolean): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    CanBeLazy
  125. def setObfuscateRefSource(s: String): ObfuscatorAnnotatorModel.this.type

    The source of obfuscation to obfuscate the entities.

    The source of obfuscation to obfuscate the entities. The values are the following: 'file': Takes the entities from the obfuscatorRefFile 'faker': Takes the entities from the Faker module 'both': Takes the entities from the obfuscatorRefFile and the faker module randomly.

    Definition Classes
    BaseDeidParams
  126. final def setOutputCol(value: String): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    HasOutputAnnotationCol
  127. def setParent(parent: Estimator[ObfuscatorAnnotatorModel]): ObfuscatorAnnotatorModel
    Definition Classes
    Model
  128. def setSameLengthFormattedEntities(entities: Array[String]): ObfuscatorAnnotatorModel.this.type

    List of formatted entities to generate the same length outputs as original ones during obfuscation.

    List of formatted entities to generate the same length outputs as original ones during obfuscation. The supported and default formatted entities are: PHONE, FAX, ID, IDNUM, BIOID, MEDICALRECORD, ZIP, VIN, SSN, DLN, LICENSE, PLATE, IRS, CFN.

    Definition Classes
    BaseDeidParams
  129. def setSeed(s: Int): ObfuscatorAnnotatorModel.this.type

    It is the seed to select the entities on obfuscate mode.

    It is the seed to select the entities on obfuscate mode. With the seed, you can reply to an execution several times with the same output.

    Definition Classes
    DeidModelParamsBaseDeidParams
  130. def setUseRandomDateDisplacement(s: Boolean): ObfuscatorAnnotatorModel.this.type

    Use a random displacement days in dates entities,that random number is based on the BaseDeidParams.seed If true use random displacement days in dates entities, if false use the BaseDeidParams.days The default value is false.

    Use a random displacement days in dates entities,that random number is based on the BaseDeidParams.seed If true use random displacement days in dates entities, if false use the BaseDeidParams.days The default value is false.

    Definition Classes
    ObfuscatorParams
  131. val supportedFormattedEntities: Array[String]
    Attributes
    protected
    Definition Classes
    BaseDeidParams
  132. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  133. def toString(): String
    Definition Classes
    Identifiable → AnyRef → Any
  134. final def transform(dataset: Dataset[_]): DataFrame
    Definition Classes
    AnnotatorModel → Transformer
  135. def transform(dataset: Dataset[_], paramMap: ParamMap): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" )
  136. def transform(dataset: Dataset[_], firstParamPair: ParamPair[_], otherParamPairs: ParamPair[_]*): DataFrame
    Definition Classes
    Transformer
    Annotations
    @Since( "2.0.0" ) @varargs()
  137. final def transformSchema(schema: StructType): StructType
    Definition Classes
    RawAnnotator → PipelineStage
  138. def transformSchema(schema: StructType, logging: Boolean): StructType
    Attributes
    protected
    Definition Classes
    PipelineStage
    Annotations
    @DeveloperApi()
  139. val uid: String
    Definition Classes
    ObfuscatorAnnotatorModel → Identifiable
  140. val useRandomDateDisplacement: BooleanParam

    Use a random displacement days in dates entities,that random number is based on the seed If true use random displacement days in dates entities,if false use the ObfuscatorParams.days The default value is false.

    Use a random displacement days in dates entities,that random number is based on the seed If true use random displacement days in dates entities,if false use the ObfuscatorParams.days The default value is false.

    Definition Classes
    ObfuscatorParams
  141. def validate(schema: StructType): Boolean
    Attributes
    protected
    Definition Classes
    RawAnnotator
  142. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  143. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  144. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  145. def wrapColumnMetadata(col: Column): Column
    Attributes
    protected
    Definition Classes
    RawAnnotator
  146. def write: MLWriter
    Definition Classes
    ParamsAndFeaturesWritable → DefaultParamsWritable → MLWritable

Inherited from HasSimpleAnnotate[ObfuscatorAnnotatorModel]

Inherited from DeidModelParams

Inherited from ObfuscatorParams

Inherited from BaseDeidParams

Inherited from AnnotatorModel[ObfuscatorAnnotatorModel]

Inherited from CanBeLazy

Inherited from RawAnnotator[ObfuscatorAnnotatorModel]

Inherited from HasOutputAnnotationCol

Inherited from HasInputAnnotationCols

Inherited from HasOutputAnnotatorType

Inherited from ParamsAndFeaturesWritable

Inherited from HasFeatures

Inherited from DefaultParamsWritable

Inherited from MLWritable

Inherited from Model[ObfuscatorAnnotatorModel]

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

Parameter setters

Ungrouped