定制 commerce-wa-ols/nicknames 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

commerce-wa-ols/nicknames

Composer 安装命令:

composer require commerce-wa-ols/nicknames

包简介

Find nicknames for a given name or perform a reverse search on a nickname.

README 文档

README

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.

统计信息

  • 总下载量: 45
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固