WSS_NamedEntityValidator.rb
def validate_item(source_item)
  valid_for = []
  text = source_item.get_text.to_string
  $validation_terms.each do |entity_type, terms|
    # Check if item text includes $validation_terms
    valid_for << entity_type if terms.any? { |term| text.include? term }
  end
  valid_for
end
# Validates item by checking if it contains $validation_terms.
#
# @param source_item [SourceItem] the source item being processed
# @return [Array<String>] list of entiity types with included terms
Validates item by checking if it contains $validation_terms.
Validates item by checking if it contains $validation_terms .
def validate_item(source_item)
  valid_for = []
  text = source_item.get_text.to_string
  $validation_terms.each do |entity_type, terms|
    valid_for << entity_type if terms.any? { |term| text.include? term }
  end
  valid_for
end
def validate_item ( source_item ) valid_for = [ ] text = source_item . get_text . to_string $validation_terms . each do | entity_type , terms | valid_for << entity_type if terms . any? { | term | text . include? term } end valid_for end
Validates item by checking if it contains $validation_terms.
Validates item by checking if it contains $validation_terms .
# Check if item text includes $validation_terms
list of entiity types with included terms
list of entiity types with included terms
Array<String>
source_item
the source item being processed
the source item being processed