Skip to main content

Name Extractor is a small AI program to extract name and gender from characters in text.

Project description

Name Extractor

Name Extractor is a small AI program that analyzes text for characters and retrieves their full names and genders

How to use

Install NameExtractor:

pip install NameExtractor

Use Name Extractor in your code:

import NameExtractor
extractor = NameExtractor.NameExtractor("John Robert Smith and Mary Anne Johnson went to the park.")

#install NLTK resources
extractor.install()

#extract names
extracted_names = extractor.extract_names()

#determine genders
names_with_genders = extractor.determine_genders(extracted_names)

for name in names_with_genders:
    middlenames_str = ', '.join(name.middlenames) + ', ' if name.middlenames else ''
    print(f"Name: {name.text}, Gender: {name.gender}, Last Name: {name.surname}, Middle Names: {middlenames_str}")

More features coming soon!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

NameExtractor-1.0.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

NameExtractor-1.0.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file NameExtractor-1.0.3.tar.gz.

File metadata

  • Download URL: NameExtractor-1.0.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.0

File hashes

Hashes for NameExtractor-1.0.3.tar.gz
Algorithm Hash digest
SHA256 136974bf2b852b52eb3506d740690c6a28b1cf00c660d67b348bd4fcbe445716
MD5 6d89a39639bfb02dfa18807a4f4d3703
BLAKE2b-256 8a8fe69717281b3e4d57fe2c6cf8da6de0f7288e2e96b27f649e6e6cd0027d0a

See more details on using hashes here.

File details

Details for the file NameExtractor-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: NameExtractor-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.0

File hashes

Hashes for NameExtractor-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0af8bdb495aad96669e03577e83495674f2bfa9ddbd2156f2a058e814f64bbf8
MD5 85b96c476b8d82da8c873904aec23b14
BLAKE2b-256 1c9b9993e68fee4a9852ba13ddfe48f0cf90aa94ae7d782d2a3ff04be4832564

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page