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
Release history Release notifications | RSS feed
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.4.tar.gz
(2.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file NameExtractor-1.0.4.tar.gz.
File metadata
- Download URL: NameExtractor-1.0.4.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e021ba24757093b3e48258060d9e298459ebfdd243d52b61f955433305a65daf
|
|
| MD5 |
a4ab6cfddc3a01bcc4c4a2c20c276e7d
|
|
| BLAKE2b-256 |
bb84422d96b79f8aa44a7b333a2407db62ab0d2a3c529b7f0b57395bb8c017a4
|
File details
Details for the file NameExtractor-1.0.4-py3-none-any.whl.
File metadata
- Download URL: NameExtractor-1.0.4-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90886b28ed2b5d4a02636f0aaad138dd8eecfe952a1091db8a4aa8bc0738873e
|
|
| MD5 |
cc0445e3b7842fb816599d2f3bc0d86f
|
|
| BLAKE2b-256 |
956e729457f53f893756438bc3bda56c9b36a8b08033131c555efa760572e739
|