Giter VIP home page Giter VIP logo

nicknames's Introduction

Nicknames1

Code Climate Build Status

Nicknames is a simple package that either returns an array of common nicknames for a provided name or returns an array of potential matches to a provided nickname. The data features common English diminutives, nicknames and shortened forms, of given names.

For example, "William" may appear in databases as "Bill" or "Willie", and "Rebecca" as "Becca" or "Becky".

The list of names is from Diminutives.db with some extra names added to the list from our sources. The idea behind the package has also taken heavy influence from the ruby gem Nickname which also has some great information about other techniques for fuzzy matching strings.

Usage

Get nicknames for a given formal name.

Nicknames::givenTo("William");use CommerceWA\Utilities\Nicknames;

The above example will return:

Array
(
    [0] => bill
    [1] => billy
    [2] => will
    [3] => willie
    [4] => willy
)

Get the formal name for a given nickname.

use CommerceWA\Utilities\Nicknames;

Nicknames::givenTo("Becky");

The above example will return:

Array
(
    [0] => rebecca
)

Why?

The library was created to solve issues when trying match names from multiple databases where full names and preferred names (nicknames) were used to identify a person.

Example of different names for the same person

first_name surname
Database 1 Bill Doe
Database 2 William Doe

Installation

This package uses composer so you can just add commerce-wa-ols/nicknames as a dependency to your composer.json file or execute the following command:

composer require commerce-wa-ols/nicknames

Contributors

Developed by Cyrus Eftos at the Department of Commerce.

nicknames's People

Contributors

cyruseftos avatar ocean avatar

Stargazers

Jared Van Valkengoed avatar Sebastien Fourault avatar

Watchers

 avatar  avatar James Cloos avatar

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.