承接 chrisullyott/human-name-parser 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

chrisullyott/human-name-parser

最新稳定版本:v2.0.0

Composer 安装命令:

composer require chrisullyott/human-name-parser

包简介

A human name parser written in PHP.

README 文档

README

Latest Stable Version Total Downloads

A human name parser written in PHP.

Based on Josh Fraser's PHP-Name-Parser. I attempted to rewrite the library to be more easily understandable (at least to myself). Nearly all the original features are maintained.

The algorithm first sanitizes a name string, and then breaks it into smaller pieces using a library of professional titles and suffixes.

Installation

Include in your project, or, install with Composer:

$ composer require chrisullyott/human-name-parser

Parsing a name

use ChrisUllyott\HumanNameParser;

$parser = new HumanNameParser('Dr. martin luther king jr');
print_r($parser->parse());
Array
(
    [full]       => Dr. Martin Luther King Jr.
    [salutation] => Dr.
    [first]      => Martin
    [middle]     => Luther
    [last]       => King
    [suffix]     => Jr.
)

Methods

Name Sample output
getFullName() Dr. Martin Luther King Jr.
getSalutation() Dr.
getFirstName() Martin
getMiddleName() Luther
getLastName() King
getSuffix() Jr.

统计信息

  • 总下载量: 68.55k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-03-23