EntityTypeGuard

data class EntityTypeGuard(val invalidPatterns: List<String>) : MentionValidationRule

Rejects generic nouns for specific entity types.

Example: "The person" or "A company" are too vague for entity names.

Constructors

Link copied to clipboard
constructor(invalidPatterns: List<String>)

Properties

Link copied to clipboard
open override val description: String

Human-readable description of this rule.

Link copied to clipboard

List of generic patterns to reject

Functions

Link copied to clipboard
open fun failureReason(mention: String): String?
Link copied to clipboard
open fun isValid(mention: String): Boolean
Link copied to clipboard
open override fun validate(mention: String): ValidationResult

Validate a mention span.