4

describe logic/algorithm you would use to detect a (presence of) full name in a string. goals: obvious == Most reliable, hardest to fool, least false positives, as generic as possible ( == as few hardcoded data as possible)

Comments
  • 1
    Like finding a name in a sentence? I don't see any way to do that without the possibility to be fooled easily. Maybe with a huge list of names as a whitelist for words?
  • 0
    Try to find Alexander Siddig's full name. I dare you. Then do that with a 2 letter Chinese name
  • 0
    Pattern matching of every language but Java? Where's the problem?
  • 0
    @scholl3ss how would you define the pattern to match a name?
  • 0
    okay, additional piece of info: assume western-style/locale names, meaning no chinese/japanese/arab, nothing like that.
  • 0
    @AndSoWeCode algorithm i have in mind/my solution to this question would have no problem recognizing "Alexander Siddig" as a person's name ;)

    just curious what other people can come up with/looking for improvement if anyone has a better idea, and doing it in the form of a riddle/puzzle instead of outright describing my solution, to make it more fun ;)
  • 0
    @Midnigh-shcode Google pattern matching.
    I think c# String's Indexof pattern matching function is pretty good. Src is open.
    Just Java sucks at it.
  • 0
    It's quite easy. All you have to do is develop an AI that uses Machine Learning to identify the correct part of a sentence, then train it on millions and millions of annotated examples. For higher accuracy, use a separate instance per language.
  • 0
    @scholl3ss this wasn't request for help, this was "i wonder what ideas other people might come up".

    any specific regex pattern you would use?
  • 0
    @configurator everyone gets a neural network these days, don't they? =D

    give me a more interesting and handcrafted solution ;)
  • 0
    @Midnigh-shcode well given that it's a question about understanding natural language that's the most suitable technology.
  • 0
    @Midnigh-shcode Alexander Siddig is the short name, and not the full name.

    Siddig El Tahir El Fadil El Siddig Abderrahman Mohammed Ahmed Abdel Karim El Mahdi

    That's the full name.

    There's also this guy:

    Aliaune Damala Bouga Time Bongo Puru Nacka Lu Lu Lu Badara Akon Thiam

    or this fella:

    Pablo Diego José Francisco de Paula Juan Nepomuceno María de los Remedios Cipriano de la Santísima Trinidad Ruiz y Picasso

    But Sid is my favorite
Add Comment