SchemaValidatedMentionFilter

class SchemaValidatedMentionFilter constructor(dataDictionary: <Error class: unknown class>, propertyName: String = "name") : MentionFilter

Schema-driven mention filter that uses DataDictionary validation rules.

Looks up the entity type in the DataDictionary and applies validation rules defined in the ValidatedPropertyDefinition.

Example type-safe schema definition:

val companyType = DynamicType(
name = "Company",
ownProperties = listOf(
ValidatedPropertyDefinition(
name = "name",
validationRules = listOf(
NoVagueReferences(),
LengthConstraint(maxLength = 150)
)
)
)
)

Constructors

Link copied to clipboard
constructor(dataDictionary: <Error class: unknown class>, propertyName: String = "name")

Functions

Link copied to clipboard
open override fun isValid(mention: SuggestedMention, propositionText: String): Boolean

Validates whether an entity mention should be included in entity resolution.

Link copied to clipboard
open override fun rejectionReason(mention: SuggestedMention): String?

Optional: Provides reason for rejection (useful for debugging/logging).