Subject: | Two Middle Names |
Often people have two (or more) middle names. L:E:N fails to parse them correctly:
$ cat parse
#!/usr/bin/env perl
use strict;
use warnings;
use Lingua::EN::NameParse;
use Data::Dumper;
my $nameparser = Lingua::EN::NameParse->new(extended_titles => 1);
$nameparser->parse('Matthew Mark John Smith');
my %comps = $nameparser->components();
print Dumper(\%comps);
$ ./parse
$VAR1 = {
'initials_2' => '',
'title_1' => '',
'surname_2' => '',
'surname_1' => 'John',
'given_name_1' => 'Matthew',
'title_2' => '',
'precursor' => '',
'conjunction_2' => '',
'conjunction_1' => '',
'suffix' => '',
'non_matching' => 'Smith',
'middle_name' => 'Mark',
'initials_1' => '',
'given_name_2' => ''
};