镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Emojis are parsed as valid names #58

Closed

Description

@edwardotis

In latest release:
"John Doe ☁️" returns:
first: John
middle: Doe
last: ☁️
https://emojipedia.org/cloud/

Maybe somebody wants emojis for names, but it would be useful to have a config to remove emoji's.

Activity

  1. self-assigned this
    on Jun 28, 2017
  2. added this to the v0.5.3 milestone on Jun 28, 2017
  3. derek73 commented on Jun 28, 2017

    @derek73
    Owner

    This appears to be a way to remove emoji from a string:

    https://stackoverflow.com/questions/26568722/remove-unicode-emoji-using-re-in-python

    I implemented it as a regex in the existing config. By default it will remove emoji but you can disable it by setting the new 'emoji' regex to False. I also added some documentation:

    http://nameparser.readthedocs.io/en/latest/customize.html#don-t-remove-emojis

    It would be nice if you could give it a try before I push an updated release to pypi:

    pip install -e git+git:https://github.com/derek73/python-nameparser.git#egg=nameparser

    Let me know if any problems or other ideas.

  4. edwardotis commented on Jun 28, 2017

    @edwardotis
    Author

    Confirmed working for the following test case on python 3.5.

    Input:
    John Doe 😀☁

    Output:
    first: John
    middle:
    last:Doe

    Thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions