GithubHelp home page GithubHelp logo

jamescurran / humannameparser Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 4.0 41 KB

Returns the parts (leading initial, first, middle, last, suffix) of a name from a string. C#/.NET Port of the original PHP HumanNameParse

License: MIT License

C# 100.00%

humannameparser's Introduction

Hi there ๐Ÿ‘‹

๐ŸŒ Let's connect!

LinkedIn

GitHub

ย 

๐Ÿ’ป Tech Stack:

C# .NET

HTML5 CSS3 JavaScript

ย 

๐Ÿ“Š GitHub Stats:



humannameparser's People

Contributors

jamescurran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

humannameparser's Issues

Using this raw name format (First MidInit. LastName, Degree) to parse is giving wrong results

I have a raw name that is like, TERRENCE H. BORING, M.D. and parsing this with expectations as below:

Title: ""
FirstName: TERRENCE
Middle: H.
Lastname: BORING
Suffix: M.D.

But the actual Result is,

Title: ""
FirstName: M.D.
Middle: TERRENCE H.
Lastname: BORING
Suffix: ""

This is wrong and my guess is, it detects comma in the given name and assumes as "LastName, FirstName" format. Although, you have some samples in the github, seems its not parsing correctly.

Doesn't handle last,first

Does not properly parse a name formatted as "last,first" with no spaces around the comma. This results in the full name being classified as just the last name. Interestingly, if you add a middle name onto this, it does correctly parse all of the names: "last,first middle".

Simple fix for this is to change the following in the Parse method:
if (name.IndexOf(' ') == -1)
to
if (name.IndexOf(' ') == -1 && name.IndexOf(',') == -1)

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.