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. def handleCasing(originalFake: String, wordToReplace: String): String
    Attributes
    protected
    Definition Classes
    DeidModelParams
  62. final def hasDefault[T](param: Param[T]): Boolean
    Definition Classes
    Params
  63. def hasParam(paramName: String): Boolean
    Definition Classes
    Params
  64. def hasParent: Boolean
    Definition Classes
    Model
  65. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  66. def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  67. def initializeLogIfNecessary(isInterpreter: Boolean): Unit
    Attributes
    protected
    Definition Classes
    Logging
  68. val inputAnnotatorTypes: Array[AnnotatorType]
    Definition Classes
    ObfuscatorAnnotatorModel → HasInputAnnotationCols
  69. final val inputCols: StringArrayParam
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  70. final def isDefined(param: Param[_]): Boolean
    Definition Classes
    Params
  71. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  72. final def isSet(param: Param[_]): Boolean
    Definition Classes
    Params
  73. def isTraceEnabled(): Boolean
    Attributes
    protected
    Definition Classes
    Logging
  74. 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
  75. val lazyAnnotator: BooleanParam
    Definition Classes
    CanBeLazy
  76. def log: Logger
    Attributes
    protected
    Definition Classes
    Logging
  77. def logDebug(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  78. def logDebug(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  79. def logError(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  80. def logError(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  81. def logInfo(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  82. def logInfo(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  83. def logName: String
    Attributes
    protected
    Definition Classes
    Logging
  84. def logTrace(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  85. def logTrace(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  86. def logWarning(msg: ⇒ String, throwable: Throwable): Unit
    Attributes
    protected
    Definition Classes
    Logging
  87. def logWarning(msg: ⇒ String): Unit
    Attributes
    protected
    Definition Classes
    Logging
  88. def msgHelper(schema: StructType): String
    Attributes
    protected
    Definition Classes
    HasInputAnnotationCols
  89. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  90. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  91. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  92. 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
  93. def onWrite(path: String, spark: SparkSession): Unit
    Attributes
    protected
    Definition Classes
    ParamsAndFeaturesWritable
  94. val optionalInputAnnotatorTypes: Array[String]
    Definition Classes
    HasInputAnnotationCols
  95. val outputAnnotatorType: AnnotatorType
    Definition Classes
    ObfuscatorAnnotatorModel → HasOutputAnnotatorType
  96. final val outputCol: Param[String]
    Attributes
    protected
    Definition Classes
    HasOutputAnnotationCol
  97. lazy val params: Array[Param[_]]
    Definition Classes
    Params
  98. var parent: Estimator[ObfuscatorAnnotatorModel]
    Definition Classes
    Model
  99. val random: SecureRandom
    Attributes
    protected
    Definition Classes
    DeidModelParams
  100. 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", "contact," "id", "idnum", "bioid", "medicalrecord", "zip", "vin", "ssn", "dln", "plate", "license", "IRS", "CFN", "account".

    Definition Classes
    BaseDeidParams
  101. def save(path: String): Unit
    Definition Classes
    MLWritable
    Annotations
    @Since( "1.6.0" ) @throws( ... )
  102. 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
  103. def set[T](feature: StructFeature[T], value: T): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  104. def set[K, V](feature: MapFeature[K, V], value: Map[K, V]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  105. def set[T](feature: SetFeature[T], value: Set[T]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  106. def set[T](feature: ArrayFeature[T], value: Array[T]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  107. final def set(paramPair: ParamPair[_]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  108. final def set(param: String, value: Any): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  109. final def set[T](param: Param[T], value: T): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    Params
  110. 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
  111. def setAllTerms(value: Set[String]): ObfuscatorAnnotatorModel.this.type
  112. def setDateFormats(s: Array[String]): ObfuscatorAnnotatorModel.this.type

    Format of dates to displace

    Format of dates to displace

    Definition Classes
    BaseDeidParams
  113. 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
  114. def setDefault[T](feature: StructFeature[T], value: () ⇒ T): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  115. def setDefault[K, V](feature: MapFeature[K, V], value: () ⇒ Map[K, V]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  116. def setDefault[T](feature: SetFeature[T], value: () ⇒ Set[T]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  117. def setDefault[T](feature: ArrayFeature[T], value: () ⇒ Array[T]): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    HasFeatures
  118. final def setDefault(paramPairs: ParamPair[_]*): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected
    Definition Classes
    Params
  119. final def setDefault[T](param: Param[T], value: T): ObfuscatorAnnotatorModel.this.type
    Attributes
    protected[org.apache.spark.ml]
    Definition Classes
    Params
  120. def setEntity(e: String): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    ObfuscatorParams
  121. 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
  122. final def setInputCols(value: String*): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    HasInputAnnotationCols
  123. def setInputCols(value: Array[String]): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    HasInputAnnotationCols
  124. 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
  125. def setLazyAnnotator(value: Boolean): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    CanBeLazy
  126. 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
  127. final def setOutputCol(value: String): ObfuscatorAnnotatorModel.this.type
    Definition Classes
    HasOutputAnnotationCol
  128. def setParent(parent: Estimator[ObfuscatorAnnotatorModel]): ObfuscatorAnnotatorModel
    Definition Classes
    Model
  129. 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, CONTACT, ID, IDNUM, BIOID, MEDICALRECORD, ZIP, VIN, SSN, DLN, LICENSE, PLATE, IRS, CFN, ACCOUNT.

    Definition Classes
    BaseDeidParams
  130. 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
  131. 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
  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