trait DeidModelParams extends AnyRef
A trait that contains all the params that are common in DeIdentificationModel and ObfuscatorAnnotatorModel.
- Self Type
- DeidModelParams with BaseDeidParams
- See also
BaseDeidParams to see params
- Alphabetic
- By Inheritance
- DeidModelParams
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
GEOGRAPHIC_ENTITIES_PRIORITY: Map[String, Int]
- Attributes
- protected
-
val
GEO_METADATA_KEY: String
- Attributes
- protected
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
documentAwareNameSeed(documentID: Option[String]): Int
Returns the seed used to select fake names.
Returns the seed used to select fake names. When BaseDeidParams.idBasedObfuscation is enabled and a document ID is available, the seed is derived from the document ID (salted with the base seed) so that the fake name selection depends on the document. This makes the same name obfuscate consistently within a document but differently across documents. When disabled or when no document ID is available, the regular base seed is returned.
- Attributes
- protected
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatStateAsOriginal(fakeState: String, originalState: String): String
Renders a fake state in the same format as the chunk it replaces.
Renders a fake state in the same format as the chunk it replaces.
Addresses.state is always stored as a two letter abbreviation, so a spelled out chunk such as "New York" has to be expanded to "California" instead of being replaced by "CA". Unknown abbreviations are returned unchanged.
- Attributes
- protected
-
def
generateFakeBySameLength(wordToReplace: String, entity: String): String
obfuscating digits to new digits, letters to new letters and others remains the same
-
def
generateFakeBySameLengthUsingHash(wordToReplace: String, entity: String): String
- Attributes
- protected
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getDocumentIDFromSentences(sentences: Seq[Annotation]): Option[String]
- Attributes
- protected
-
def
getEntitiesBySentence(chunks: Seq[Annotation], sentenceCount: Int): Seq[Seq[Annotation]]
- Attributes
- protected
-
def
getEntityField(annotation: Annotation): String
- Attributes
- protected
-
def
getExternalFakers(entityClass: String, customFakers: Map[String, List[String]], wordToReplace: String): List[String]
- Attributes
- protected
-
def
getFakeByHashcode(fakes: Seq[String], wordToReplace: String, entity: String, seed: Int): String
Picks a fake from
fakesby hashing the original word, so the same word always maps to the same fake for a given seed.Picks a fake from
fakesby hashing the original word, so the same word always maps to the same fake for a given seed.The hash can land on the original word itself, which would silently leave the PHI in place. Small pools make this likely enough to matter: a two letter STATE has a 1 in 50 chance. When it happens the draw is repeated once with the next seed. The retry is deliberately not forced into a loop and the candidate list is never filtered, so the existing selection algorithm and its determinism stay intact; if the second draw collides as well the value is returned unchanged.
Formatted entities (see BaseDeidParams.sameLengthFormattedEntities, for example ZIP or SSN) do not reach this method, they are obfuscated by generateFakeBySameLengthUsingHash which already guarantees a different value.
- Attributes
- protected
-
def
getFakeWithSameSize(fakes: Seq[String], wordToReplace: String, entity: String, lengthDeviation: Int, seed: Int): String
- Attributes
- protected
- def getFakersEntity(entity: String, result: String): Seq[String]
-
def
getMaxSentence(annotations: Seq[Annotation]): Int
- Attributes
- protected
-
def
getShiftDaysFromSentences(sentences: Seq[Annotation]): Option[Int]
- Attributes
- protected
-
def
getStaticObfuscationFakes(entityClass: String, wordToReplace: String): Option[Seq[String]]
- Attributes
- protected
-
def
handleCasing(originalFake: String, wordToReplace: String): String
- Attributes
- protected
-
def
handleGeographicConsistency(protectedEntities: Seq[Seq[Annotation]]): Seq[Seq[Annotation]]
- Attributes
- protected
-
def
handleObfuscationEquivalents(sentenceBaseAnnotations: Seq[Seq[Annotation]]): Seq[Seq[Annotation]]
- Attributes
- protected
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isEmptyString(value: String): Boolean
- Attributes
- protected
-
def
isGeoEntity(annotation: Annotation): Boolean
- Attributes
- protected
-
def
isGeoObfuscationEnabled: Boolean
- Attributes
- protected
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isNameEntity(entityClass: String): Boolean
The name-related entities that BaseDeidParams.idBasedObfuscation applies to.
The name-related entities that BaseDeidParams.idBasedObfuscation applies to. It extends nameEntities with the first/last name entities.
- Attributes
- protected
-
def
isNationalityAware: Boolean
Nationality awareness is only applied when the
nationalityAwarenessparam is enabled and the language is English.Nationality awareness is only applied when the
nationalityAwarenessparam is enabled and the language is English. For any other language it is disabled regardless of the param value.- Attributes
- protected
-
def
isObfuscateDate(entityClass: String): Boolean
- Attributes
- protected
-
def
isSameAsOriginal(fake: String, wordToReplace: String): Boolean
Whether an obfuscated value is indistinguishable from the value it should have replaced.
Whether an obfuscated value is indistinguishable from the value it should have replaced. The comparison ignores casing and surrounding spaces because handleCasing already aligns the fake with the original, so "ny" replaced by "NY" is still a leak.
- Attributes
- protected
-
implicit
lazy val
locale: Locale
- Attributes
- protected
-
val
nameEntities: Seq[String]
- Attributes
- protected
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
obfuscateNameEntity(originalName: String, keepTextSize: Boolean, lengthDeviation: Int, namePartsMemory: Map[String, String], documentID: Option[String] = None): String
- Attributes
- protected
-
def
obfuscateZIP(wordToReplace: String): String
- Attributes
- protected
-
def
selectFakeFromAllFakes(wordToReplace: String, entityClass: String, maskedEntity: String, allFakes: Seq[String], documentID: Option[String] = None): String
- Attributes
- protected
-
def
shouldUseConsistentNameParts(entityClass: String): Boolean
- Attributes
- protected
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()