WSS_NamedEntityValidator.rb
def nuixWorkerItemCallback(worker_item)
  installed_entities = worker_item.get_installed_named_entity_types
  entity_types = installed_entities.to_h.merge($entity_types)
  # Scan item text for matches
  matches = worker_item.scan_item_text(entity_types)
  puts "Found #{matches.size} matches"
  return if matches.empty?

  # Iterate and check matches
  entities = validate(worker_item, matches)
  # Add validated entities
  worker_item.add_named_entities(entities)
end
# Scans item text for entities.
# Includes entity for SWIFT codes.
# Requires that phone-number entities must come from an item that contains 'phone', 'mobile', or 'call.'
# Normalizes personal-id-num entities, by adding dashes.
#
# @param worker_item [WorkerItem] the item being processed
Scans item text for entities.
Includes entity for SWIFT codes.
Scans item text for entities . Includes entity for SWIFT codes .
def nuixWorkerItemCallback(worker_item)
  installed_entities = worker_item.get_installed_named_entity_types
  entity_types = installed_entities.to_h.merge($entity_types)
  matches = worker_item.scan_item_text(entity_types)
  puts "Found #{matches.size} matches"
  return if matches.empty?
  entities = validate(worker_item, matches)
  worker_item.add_named_entities(entities)
end
def nuixWorkerItemCallback ( worker_item ) installed_entities = worker_item . get_installed_named_entity_types entity_types = installed_entities . to_h . merge ( $entity_types ) matches = worker_item . scan_item_text ( entity_types ) puts "Found #{matches.size} matches" return if matches . empty? entities = validate ( worker_item , matches ) worker_item . add_named_entities ( entities ) end
Scans item text for entities.
Scans item text for entities .
# Scan item text for matches # Iterate and check matches # Add validated entities
worker_item
the item being processed
the item being processed