Git Product home page Git Product logo

amara3-names's Introduction

WhosWho

[PyPI version] (http://badge.fury.io/py/whoswho) [Build Status] (https://travis-ci.org/rliebz/whoswho)

A simple python library for determining whether two names describe the same person.

Installation

$ pip install whoswho

Requires Python >= 2.6 or >= 3.3 with pip.

Usage

Name Matching

In order to test two names, simply pass them in as strings or unicode.

>>> from whoswho import who
>>> who.match('Liebowitz, R.', 'Mr. Robert Evan Liebowitz')
True
>>> who.match('Robert Liebowitz, Jr.', 'Robert Liebowitz, Sr.')
False

It is possible to adjust the strictness with which names are checked

>>> who.match('R Liebowitz', 'Robert Liebowitz')
True
>>> who.match('R Liebowitz', 'Robert Liebowitz', 'strict')
False

Fuzzy Matching

WhosWho can also produce a ratio based on the percent match of two names.

>>> who.ratio('Robert Leibowitz', 'Robert Liebowitz')
93
>>> who.ratio('E. Robert Lebovich', 'Robert E. Liebowitz')
29

License

MIT licensed. See the bundled LICENSE file for more details.

amara3-names's People

Contributors

rliebz avatar uogbuji avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

zepheira

amara3-names's Issues

Attempt nickname support

Nickname support dropped off since the latest refactoring.

>>> s1 = 'Edward S. Boyden'
>>> s2 = 'Edward Boyden'
>>> s3 = 'Ed Boyden'
>>> from amara3.names.model import human_name
>>> from amara3.names import compare, config
>>> compare.ratio(s1, s2)
0.9285714285714285
>>> compare.ratio(s1, s3)
0.5
>>> compare.ratio(s2, s3)
0.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.