Re: String parsing (2 questions)

Discussion in 'Perl Misc' started by Rainer Weikusat, Aug 29, 2012.

  1. Ben Morrow <> writes:

    [...]

    > Parsing names is extremely difficult, because they are extremely
    > variable. If at all possible you want to design your systems so that you
    > don't need to, and instead ask your users questions like 'what is your
    > full name' and 'how would you like us to address you'.
    >
    > In this case, how would you distinguish between these two?
    >
    > Van Horn Tim
    > Watson Mary Jane
    >
    > Can you make a complete list of 'von's which might start a two-part
    > surname, or do you have to handle cases like married women who have
    > taken both surnames without a hyphen (and, potentially, their
    > children)?


    The solution to this is to define a grammar for 'supported name
    formats' which catches the expected cases and live with the fact that
    any heuristic fails in some situations. This means that 'Watson Mary
    Jane' may have to decide if he is 'Watson M Jane' or if she is 'Mary J
    Watson' or any other permutation of the given set of letter and
    spaces.
    Rainer Weikusat, Aug 29, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GIMME
    Replies:
    2
    Views:
    868
    GIMME
    Feb 11, 2004
  2. Naren
    Replies:
    0
    Views:
    570
    Naren
    May 11, 2004
  3. Rainer Weikusat

    Re: String parsing (2 questions)

    Rainer Weikusat, Aug 28, 2012, in forum: Perl Misc
    Replies:
    0
    Views:
    338
    Rainer Weikusat
    Aug 28, 2012
  4. Jürgen Exner

    Re: String parsing (2 questions)

    Jürgen Exner, Aug 29, 2012, in forum: Perl Misc
    Replies:
    0
    Views:
    318
    Jürgen Exner
    Aug 29, 2012
  5. Jürgen Exner

    Re: String parsing (2 questions)

    Jürgen Exner, Aug 29, 2012, in forum: Perl Misc
    Replies:
    0
    Views:
    362
    Jürgen Exner
    Aug 29, 2012
Loading...

Share This Page