Skip to main content

Extract people from text

Project description

person-extractor

Work in Progress: Identify People's Names in Text

usage

You initialize a PersonExtractor with a path to a CSV of names with each column a language. You can create a csv through Wikinames.

from person_extractor import PersonExtractor

text = "John Doe and Jane Doe live in Springfield"

extractor = PersonExtractor(data="names.csv")

people = extractor.extract(text)

extract returns a list of objects:

[
    { "text": "John Doe", "start": 0, "end": 7 },
    { "text": "Jane Doe", "start": 13, "end": 20 }
]

test

To test the package run:

python -m unittest person_extractor.test

contact

Post an issue at https://github.com/Mak4Lab/person-extractor/issues or email the package authors at daniel@mak4lab.com and victoria@mak4lab.com

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

person-extractor-3.0.0.tar.gz (13.4 kB view details)

Uploaded Source

File details

Details for the file person-extractor-3.0.0.tar.gz.

File metadata

  • Download URL: person-extractor-3.0.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.1.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/2.7.17

File hashes

Hashes for person-extractor-3.0.0.tar.gz
Algorithm Hash digest
SHA256 4f4b031a7564a70acfe190136b2710b2af0b4f4941d9dc83f0abd904fcbbff1f
MD5 b34dffbf9bd9574808c2ff80eff97896
BLAKE2b-256 ce95995dba00801f953ee03c60d0f0147389342cc33e639b070688867353f8d4

See more details on using hashes here.

Supported by

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