Skip to content

Instantly share code, notes, and snippets.

@sevperez
Created August 24, 2020 21:42
Show Gist options
  • Select an option

  • Save sevperez/c9d1d3eeb43f75a684535c41637d4f86 to your computer and use it in GitHub Desktop.

Select an option

Save sevperez/c9d1d3eeb43f75a684535c41637d4f86 to your computer and use it in GitHub Desktop.
def print_entity_info(entity):
print(f"Text:\t{entity.text}")
print(f"Type:\t{entity.type}")
print(f"Start:\t{entity.start_char}")
print(f"End:\t{entity.end_char}")
print_entity_info(moby_p1.entities[0])
# Text: Ishmael
# Type: PERSON
# Start: 8
# End: 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment