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.2.tar.gz
(1.5 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.2.tar.gz.
File metadata
- Download URL: NameExtractor-1.0.2.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eda0b9027ec521bcd436156510206d02959aba923e13ed599ad3860d6d347d97
|
|
| MD5 |
d7b0dc2ff465a30de59fb5207fd9ddf5
|
|
| BLAKE2b-256 |
07c58c1a9e14dc1fc195520b777cda5980efdf9d4f0c7511be1977936f32299b
|
File details
Details for the file NameExtractor-1.0.2-py3-none-any.whl.
File metadata
- Download URL: NameExtractor-1.0.2-py3-none-any.whl
- Upload date:
- Size: 1.5 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 |
9093f30b4d2ca984d9ea3f6cc2e344ece256189743775104a9104b668268eca1
|
|
| MD5 |
0a5fb4bfc42074cd6f4185b76c70bf4a
|
|
| BLAKE2b-256 |
1b39001e5a0852251b7cf479d89b63f9fcba3bf414321e5e5a3d0b17610b4e7b
|