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 = "Але дістатися на роботу працівникам цих бізнесів, якщо у них немає власного автомобіля або грошей на таксі чи корпоративну розвозку, стане справжньою проблемою, прогнозує політолог Микола Давидюк."

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

people = extractor.extract(text)

extract returns a list of objects:

    [
        {
            'start': 336,
            'end': 343,
            'text': 'Давидюк',
            'spellings': {
                'en': 'Davidyuk',
                'uk': 'Давидюк'
            }
        }
    ]

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.

Files for person-extractor, version 4.0.0
Filename, size File type Python version Upload date Hashes
Filename, size person-extractor-4.0.0.tar.gz (360.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page