...
 
Commits (5)
Revision history for Perl CPAN module Lingua::En::NameParse
1.38 Oct 2018
Allowed for names of type Jo A. Lin, thanks to Mike Edwards via Github
Note that an ambiguity now arises for names such as Mr ME Adam Symonds
the parser will assume a first name of ME, when it is actually the initials.
The surname should be Adam-Symonds to parse correctly
Fixed typo in %component_order in NameParse.pm
Updated report method to not issue warning on empty results from case_all_reversed method
1.37 18 Aug 2018
Allow case_all_reverse to work with name type of 'John' (thanks to Hugh S. Myers for reporting this)
Fixed github issue for EdwardsMike, 2 letter surname not correctly parsed
......
......@@ -39,11 +39,11 @@
"provides" : {
"Lingua::EN::NameParse" : {
"file" : "lib/Lingua/EN/NameParse.pm",
"version" : "1.37"
"version" : "1.38"
},
"Lingua::EN::NameParse::Grammar" : {
"file" : "lib/Lingua/EN/NameParse/Grammar.pm",
"version" : "1.37"
"version" : "1.38"
}
},
"release_status" : "stable",
......@@ -55,6 +55,6 @@
"url" : "https://github.com/kimryan/Lingua-EN-NameParse"
}
},
"version" : "1.37",
"version" : "1.38",
"x_serialization_backend" : "JSON::PP version 2.27300"
}
......@@ -17,10 +17,10 @@ name: Lingua-EN-NameParse
provides:
Lingua::EN::NameParse:
file: lib/Lingua/EN/NameParse.pm
version: '1.37'
version: '1.38'
Lingua::EN::NameParse::Grammar:
file: lib/Lingua/EN/NameParse/Grammar.pm
version: '1.37'
version: '1.38'
requires:
Parse::RecDescent: '1'
Test::Pod::Coverage: '1.04'
......@@ -31,5 +31,5 @@ requires:
resources:
license: http://dev.perl.org/licenses/
repository: https://github.com/kimryan/Lingua-EN-NameParse
version: '1.37'
version: '1.38'
x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
liblingua-en-nameparse-perl (1.38-1) unstable; urgency=medium
* Team upload.
* Import upstream version 1.38.
* Update years of packaging copyright.
-- gregor herrmann <gregoa@debian.org> Sat, 17 Nov 2018 19:47:18 +0100
liblingua-en-nameparse-perl (1.37-1) unstable; urgency=medium
[ Salvatore Bonaccorso ]
......
......@@ -12,7 +12,7 @@ Copyright: 2005-2008, Ernesto Hernández-Novich <emhn@telcel.net.ve>
2007, Russ Allbery <rra@debian.org>
2007, Damyan Ivanov <dmn@debian.org>
2008, Roberto C. Sanchez <roberto@debian.org>
2008-2010, gregor hermann <gregoa@debian.org>
2008-2018, gregor hermann <gregoa@debian.org>
2010, Nathan Handler <nhandler@debian.org>
2010-2011, Nicholas Bamber <nicholas@periapt.co.uk>
2013-2018, Florian Schlichting <fsfs@debian.org>
......
......@@ -508,7 +508,7 @@ NameParse was written by Kim Ryan <kimryan at cpan dot org>
=head1 COPYRIGHT AND LICENSE
Copyright (c) 2016 Kim Ryan. All rights reserved.
Copyright (c) 2018 Kim Ryan. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
......@@ -527,7 +527,7 @@ use Parse::RecDescent;
use Exporter;
use vars qw (@ISA @EXPORT_OK);
our $VERSION = '1.37';
our $VERSION = '1.38';
@ISA = qw(Exporter);
@EXPORT_OK = qw(clean case_surname);
......@@ -683,7 +683,7 @@ my %component_order=
'Mr_A_&_Ms_B_Smith' => ['title_1','initials_1','conjunction_1','title_2','initials_2','surname_1'],
'Mr_&_Ms_A_Smith' => ['title_1','conjunction_1','title_2','initials_1','surname_1'],
'Mr_A_&_B_Smith' => ['title_1','initials_1','conjunction_1','initials_2','surname_1'],
'John_Smith_&Mary_Jones' => ['given_name_1','surname_1','conjunction_1','given_name_2','surname_2'],
'John_Smith_&_Mary_Jones' => ['given_name_1','surname_1','conjunction_1','given_name_2','surname_2'],
'John_&_Mary_Smith' => ['given_name_1','conjunction_1','given_name_2','surname_1'],
'A_Smith_&_B_Jones' => ['initials_1','surname_1','conjunction_1','initials_2','surname_2'],
......@@ -1075,7 +1075,16 @@ sub report
printf($fmt,"Original Input",$name->{original_input});
printf($fmt,"Cleaned Input",$name->{input_string});
printf($fmt,"Case all",$name->case_all);
printf($fmt,"Case all reversed",$name->case_all_reversed);
if ($name->case_all_reversed)
{
printf($fmt,"Case all reversed",$name->case_all_reversed);
}
else
{
printf($fmt,"Case all reversed",'not applicable');
}
printf($fmt,"Salutation",$name->salutation(salutation => 'Dear',sal_default => 'Friend', sal_type => 'title_plus_surname'));
printf($fmt,"Type", $props{type});
printf($fmt,"Number", $props{number});
......
......@@ -23,7 +23,7 @@ NameParse::Grammar was written by Kim Ryan <kimryan at cpan dot org>.
=head1 COPYRIGHT AND LICENSE
Copyright (c) 2016 Kim Ryan. All rights reserved.
Copyright (c) 2018 Kim Ryan. All rights reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
......@@ -36,7 +36,7 @@ package Lingua::EN::NameParse::Grammar;
use strict;
use warnings;
our $VERSION = '1.37';
our $VERSION = '1.38';
# Rules that define valid orderings of a names components
......@@ -511,12 +511,13 @@ q{
constonant: /[A-DF-HJ-NP-TV-Z]]/
# For use with John_Adam_Smith and John_A_Smith name types
given_name_standard:
/[A-Z]{3,} / |
given_name_standard:
/[AEIOU]/ constonant / / |
constonant /[AEIOUY] / |
/[A-Z]{2,} / |
split_given_name
# Patronymic, place name and other surname prefixes
prefix:
/(
......