line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Taxon::Parse::Author; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
887
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
783
|
use parent qw( Taxon::Parse ); |
|
1
|
|
|
|
|
393
|
|
|
1
|
|
|
|
|
7
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.013'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub init { |
11
|
1
|
|
|
1
|
0
|
2
|
my $self = shift; |
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
|
|
7
|
my $p = $self->{pattern_parts}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# a_ - patterns for author names |
16
|
1
|
|
|
|
|
6
|
$p->{apostrophe} = qr/[\'´`\x{2019}]/xms; |
17
|
1
|
|
|
|
|
5
|
$p->{compound_connector} = qr/[-]/xms; |
18
|
1
|
|
|
|
|
352
|
$p->{prefix} = qr/ |
19
|
|
|
|
|
|
|
(?: |
20
|
|
|
|
|
|
|
[vV](?:an)(?:[ -](?:den|der))? |
21
|
|
|
|
|
|
|
|An \s+ der |
22
|
|
|
|
|
|
|
|[vV]on (?:[ -](?:den|der|dem))? |
23
|
|
|
|
|
|
|
|v\.? |
24
|
|
|
|
|
|
|
|[vV]\.?\s*d\.?\s* |
25
|
|
|
|
|
|
|
|(?:delle|del|[Dd]es|De|de|di|Di|da|du|N)[`' _]? |
26
|
|
|
|
|
|
|
|le |
27
|
|
|
|
|
|
|
|[Dd] $p->{apostrophe} |
28
|
|
|
|
|
|
|
|[Dd]e (?:[ ][lL]a)? |
29
|
|
|
|
|
|
|
|d\. |
30
|
|
|
|
|
|
|
|Mac |
31
|
|
|
|
|
|
|
|Mc |
32
|
|
|
|
|
|
|
|Le |
33
|
|
|
|
|
|
|
|St\.? |
34
|
|
|
|
|
|
|
|Ou |
35
|
|
|
|
|
|
|
|O' |
36
|
|
|
|
|
|
|
|'t |
37
|
|
|
|
|
|
|
|\? |
38
|
|
|
|
|
|
|
) |
39
|
|
|
|
|
|
|
/xms; |
40
|
1
|
|
|
|
|
11
|
$p->{suffix} = qr/ |
41
|
|
|
|
|
|
|
(?: |
42
|
|
|
|
|
|
|
(?: |
43
|
|
|
|
|
|
|
f|fil|j|jr|jun|junior|sr|sen|senior|ms|\? |
44
|
|
|
|
|
|
|
) |
45
|
|
|
|
|
|
|
\.? |
46
|
|
|
|
|
|
|
) |
47
|
|
|
|
|
|
|
/xms; |
48
|
1
|
|
|
|
|
4
|
$p->{team_connector} = qr/ |
49
|
|
|
|
|
|
|
(?: |
50
|
|
|
|
|
|
|
\s* |
51
|
|
|
|
|
|
|
(?: &|,|; ) |
52
|
|
|
|
|
|
|
\s* |
53
|
|
|
|
|
|
|
) |
54
|
|
|
|
|
|
|
| |
55
|
|
|
|
|
|
|
(?: |
56
|
|
|
|
|
|
|
\s+ |
57
|
|
|
|
|
|
|
(?: et|and|und|y ) |
58
|
|
|
|
|
|
|
\s+ |
59
|
|
|
|
|
|
|
) |
60
|
|
|
|
|
|
|
/xms; |
61
|
1
|
|
|
|
|
3
|
$p->{reference_relation} = qr/ |
62
|
|
|
|
|
|
|
(?: |
63
|
|
|
|
|
|
|
ex\.? |
64
|
|
|
|
|
|
|
|in |
65
|
|
|
|
|
|
|
|sensu |
66
|
|
|
|
|
|
|
|emend\.? |
67
|
|
|
|
|
|
|
|sec\.? |
68
|
|
|
|
|
|
|
) |
69
|
|
|
|
|
|
|
/xms; |
70
|
1
|
|
|
|
|
5
|
$p->{word} = qr/ |
71
|
|
|
|
|
|
|
[\p{IsUpper}\'][\p{IsLower}\'´`\x{2019}]+ |
72
|
1
|
|
|
1
|
|
310
|
/xms; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
73
|
1
|
|
|
|
|
27
|
$p->{compound} = qr/ |
74
|
|
|
|
|
|
|
$p->{word} |
75
|
|
|
|
|
|
|
$p->{compound_connector} |
76
|
|
|
|
|
|
|
$p->{word} |
77
|
|
|
|
|
|
|
/xms; |
78
|
1
|
|
|
|
|
330
|
$p->{initial} = qr/ |
79
|
|
|
|
|
|
|
\b[\p{IsUpper}\'´`][\p{IsLower}]{0,2}[\.] |
80
|
|
|
|
|
|
|
/xms; |
81
|
1
|
|
|
|
|
80
|
$p->{abbreviation} = qr/ |
82
|
|
|
|
|
|
|
(?: |
83
|
|
|
|
|
|
|
(?: |
84
|
|
|
|
|
|
|
$p->{prefix}\s* |
85
|
|
|
|
|
|
|
)? |
86
|
|
|
|
|
|
|
(?: |
87
|
|
|
|
|
|
|
(?: |
88
|
|
|
|
|
|
|
[\p{IsUpper}\'´`][\p{IsLower}]{0,9}[\.]? |
89
|
|
|
|
|
|
|
)(?: |
90
|
|
|
|
|
|
|
[-] |
91
|
|
|
|
|
|
|
[\p{IsUpper}\'´`][\p{IsLower}]{0,9}[\.]? |
92
|
|
|
|
|
|
|
)? |
93
|
|
|
|
|
|
|
) |
94
|
|
|
|
|
|
|
| \b DC[\.] |
95
|
|
|
|
|
|
|
| hort\. \s* (?: [\p{IsUpper}\p{IsLower}][\p{IsLower}]{0,9}[\.]? )? |
96
|
|
|
|
|
|
|
) |
97
|
|
|
|
|
|
|
/xms; |
98
|
1
|
|
|
|
|
1870
|
$p->{abbreviated_name} = qr/ |
99
|
|
|
|
|
|
|
(?: |
100
|
|
|
|
|
|
|
$p->{abbreviation} |
101
|
|
|
|
|
|
|
)(?: |
102
|
|
|
|
|
|
|
\s*(?: |
103
|
|
|
|
|
|
|
$p->{abbreviation} |
104
|
|
|
|
|
|
|
|$p->{compound} |
105
|
|
|
|
|
|
|
|$p->{word} |
106
|
|
|
|
|
|
|
) |
107
|
|
|
|
|
|
|
)* |
108
|
|
|
|
|
|
|
(?: |
109
|
|
|
|
|
|
|
\s* |
110
|
|
|
|
|
|
|
$p->{suffix} |
111
|
|
|
|
|
|
|
)? |
112
|
|
|
|
|
|
|
/xms; |
113
|
1
|
|
|
|
|
2707
|
$p->{name} = qr/ |
114
|
|
|
|
|
|
|
(?: |
115
|
|
|
|
|
|
|
(?: |
116
|
|
|
|
|
|
|
$p->{prefix}\s* |
117
|
|
|
|
|
|
|
)? |
118
|
|
|
|
|
|
|
(?: |
119
|
|
|
|
|
|
|
$p->{compound} |
120
|
|
|
|
|
|
|
|$p->{word} |
121
|
|
|
|
|
|
|
) |
122
|
|
|
|
|
|
|
(?: |
123
|
|
|
|
|
|
|
\s*$p->{suffix} |
124
|
|
|
|
|
|
|
)? |
125
|
|
|
|
|
|
|
)(?: |
126
|
|
|
|
|
|
|
\s* |
127
|
|
|
|
|
|
|
(?: |
128
|
|
|
|
|
|
|
$p->{prefix}\s* |
129
|
|
|
|
|
|
|
)? |
130
|
|
|
|
|
|
|
(?: |
131
|
|
|
|
|
|
|
$p->{compound} |
132
|
|
|
|
|
|
|
|$p->{word} |
133
|
|
|
|
|
|
|
) |
134
|
|
|
|
|
|
|
(?: |
135
|
|
|
|
|
|
|
\s*$p->{suffix} |
136
|
|
|
|
|
|
|
)? |
137
|
|
|
|
|
|
|
)* |
138
|
|
|
|
|
|
|
/xms; |
139
|
1
|
|
|
|
|
6309087
|
$p->{'list'} = qr/ |
140
|
|
|
|
|
|
|
(?: |
141
|
|
|
|
|
|
|
$p->{name} |
142
|
|
|
|
|
|
|
|$p->{abbreviated_name} |
143
|
|
|
|
|
|
|
) |
144
|
|
|
|
|
|
|
(?: |
145
|
|
|
|
|
|
|
\s*[,]\s* |
146
|
|
|
|
|
|
|
(?: |
147
|
|
|
|
|
|
|
$p->{name} |
148
|
|
|
|
|
|
|
|$p->{abbreviated_name} |
149
|
|
|
|
|
|
|
) |
150
|
|
|
|
|
|
|
)* |
151
|
|
|
|
|
|
|
(?: |
152
|
|
|
|
|
|
|
(?: |
153
|
|
|
|
|
|
|
$p->{'team_connector'} |
154
|
|
|
|
|
|
|
) |
155
|
|
|
|
|
|
|
(?: |
156
|
|
|
|
|
|
|
al\.? |
157
|
|
|
|
|
|
|
|$p->{name} |
158
|
|
|
|
|
|
|
|$p->{abbreviated_name} |
159
|
|
|
|
|
|
|
) |
160
|
|
|
|
|
|
|
)* |
161
|
|
|
|
|
|
|
/xms; |
162
|
1
|
|
|
|
|
51537
|
$p->{year} = qr/ |
163
|
|
|
|
|
|
|
(?: |
164
|
|
|
|
|
|
|
1[5-9]\d\d # 1500 .. 1999 |
165
|
|
|
|
|
|
|
| |
166
|
|
|
|
|
|
|
20\d\d # 2000 .. 2099 |
167
|
|
|
|
|
|
|
) |
168
|
|
|
|
|
|
|
(?:[a-zA-Z])? |
169
|
|
|
|
|
|
|
(?: |
170
|
|
|
|
|
|
|
(?: |
171
|
|
|
|
|
|
|
[\/-] # to |
172
|
|
|
|
|
|
|
| \s* & \s* |
173
|
|
|
|
|
|
|
) |
174
|
|
|
|
|
|
|
\d{2,4} |
175
|
|
|
|
|
|
|
)? |
176
|
|
|
|
|
|
|
/xms; |
177
|
1
|
|
|
|
|
83
|
$p->{date} = qr/ |
178
|
|
|
|
|
|
|
(?: |
179
|
|
|
|
|
|
|
[\(\[]\s* |
180
|
|
|
|
|
|
|
$p->{year} |
181
|
|
|
|
|
|
|
\s*[\)\]] |
182
|
|
|
|
|
|
|
) |
183
|
|
|
|
|
|
|
|$p->{year} |
184
|
|
|
|
|
|
|
/xms; |
185
|
1
|
|
|
|
|
377
|
$p->{phrase} = qr/ |
186
|
|
|
|
|
|
|
(?: |
187
|
|
|
|
|
|
|
$p->{list} |
188
|
|
|
|
|
|
|
|$p->{name} |
189
|
|
|
|
|
|
|
|$p->{abbreviated_name} |
190
|
|
|
|
|
|
|
)(?: |
191
|
|
|
|
|
|
|
[\s,]* |
192
|
|
|
|
|
|
|
$p->{date} |
193
|
|
|
|
|
|
|
)? |
194
|
|
|
|
|
|
|
/xms; |
195
|
1
|
|
|
|
|
24457178
|
$p->{non} = qr/ |
196
|
|
|
|
|
|
|
(?: |
197
|
|
|
|
|
|
|
(?: |
198
|
|
|
|
|
|
|
\s*\,?\s* |
199
|
|
|
|
|
|
|
[\[(]? \s* |
200
|
|
|
|
|
|
|
(?: |
201
|
|
|
|
|
|
|
p \.? \s* p \.? |
202
|
|
|
|
|
|
|
| non .* |
203
|
|
|
|
|
|
|
| not .* |
204
|
|
|
|
|
|
|
| nec .* |
205
|
|
|
|
|
|
|
| nom\. \s* illeg\.? |
206
|
|
|
|
|
|
|
| nom\. \s* inval\.? |
207
|
|
|
|
|
|
|
| nom\. \s* nud\.? |
208
|
|
|
|
|
|
|
| nomen \s+ nudum |
209
|
|
|
|
|
|
|
| nom\. \s* nov\. |
210
|
|
|
|
|
|
|
| nomen \s+ novum |
211
|
|
|
|
|
|
|
| comb\. \s* illeg\. |
212
|
|
|
|
|
|
|
| nom\. \s* rej\. |
213
|
|
|
|
|
|
|
| nom\. \s* illegit\. |
214
|
|
|
|
|
|
|
| nom\. \s* cons\. |
215
|
|
|
|
|
|
|
| anon\. \s* ined\. |
216
|
|
|
|
|
|
|
| anon\. |
217
|
|
|
|
|
|
|
| auct\. \s* mult\. |
218
|
|
|
|
|
|
|
| auct\. \s* americ\. |
219
|
|
|
|
|
|
|
| pro \s+ sp\.? |
220
|
|
|
|
|
|
|
| pro \s+ hybr\.? |
221
|
|
|
|
|
|
|
) |
222
|
|
|
|
|
|
|
\s* [\])]? |
223
|
|
|
|
|
|
|
)? |
224
|
|
|
|
|
|
|
[.,;\s]* |
225
|
|
|
|
|
|
|
)? |
226
|
|
|
|
|
|
|
/xms; |
227
|
|
|
|
|
|
|
|
228
|
1
|
|
|
|
|
2289
|
$p->{plain} = qr/ |
229
|
|
|
|
|
|
|
$p->{phrase} |
230
|
|
|
|
|
|
|
(?: |
231
|
|
|
|
|
|
|
\s*\b |
232
|
|
|
|
|
|
|
$p->{reference_relation}\s+ |
233
|
|
|
|
|
|
|
$p->{phrase} |
234
|
|
|
|
|
|
|
){0,3} |
235
|
|
|
|
|
|
|
/xms; |
236
|
1
|
|
|
|
|
627694
|
$p->{bracketed} = qr/ |
237
|
|
|
|
|
|
|
[\(\[]\s* |
238
|
|
|
|
|
|
|
$p->{plain} |
239
|
|
|
|
|
|
|
\s*[\)\]] |
240
|
|
|
|
|
|
|
/xms; |
241
|
1
|
|
|
|
|
23946
|
$p->{full} = qr/ |
242
|
|
|
|
|
|
|
(?: |
243
|
|
|
|
|
|
|
$p->{bracketed}\s* |
244
|
|
|
|
|
|
|
)? |
245
|
|
|
|
|
|
|
(?: |
246
|
|
|
|
|
|
|
$p->{reference_relation} |
247
|
|
|
|
|
|
|
)? |
248
|
|
|
|
|
|
|
(?: |
249
|
|
|
|
|
|
|
\s* |
250
|
|
|
|
|
|
|
$p->{plain} |
251
|
|
|
|
|
|
|
)? |
252
|
|
|
|
|
|
|
(?: |
253
|
|
|
|
|
|
|
\s* |
254
|
|
|
|
|
|
|
$p->{date} |
255
|
|
|
|
|
|
|
)? |
256
|
|
|
|
|
|
|
(?: |
257
|
|
|
|
|
|
|
$p->{non} |
258
|
|
|
|
|
|
|
)? |
259
|
|
|
|
|
|
|
/xms; |
260
|
|
|
|
|
|
|
|
261
|
1
|
|
|
|
|
63796
|
$p->{authorcaptured} = qr/ |
262
|
|
|
|
|
|
|
(? |
263
|
|
|
|
|
|
|
$p->{bracketed}\s* |
264
|
|
|
|
|
|
|
)? |
265
|
|
|
|
|
|
|
(? |
266
|
|
|
|
|
|
|
$p->{reference_relation} |
267
|
|
|
|
|
|
|
)? |
268
|
|
|
|
|
|
|
(? |
269
|
|
|
|
|
|
|
\s* |
270
|
|
|
|
|
|
|
$p->{plain} |
271
|
|
|
|
|
|
|
)? |
272
|
|
|
|
|
|
|
(? |
273
|
|
|
|
|
|
|
\s* |
274
|
|
|
|
|
|
|
$p->{date} |
275
|
|
|
|
|
|
|
)? |
276
|
|
|
|
|
|
|
(? |
277
|
|
|
|
|
|
|
$p->{non} |
278
|
|
|
|
|
|
|
)? |
279
|
|
|
|
|
|
|
/xms; |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
|
282
|
1
|
|
|
|
|
50946
|
my $patterns = $self->{patterns}; |
283
|
1
|
|
|
|
|
9
|
my @patterns = qw< full abbreviated_name authorcaptured>; |
284
|
1
|
|
|
|
|
8
|
map { $patterns->{$_} = $p->{$_} } @patterns; |
|
3
|
|
|
|
|
210
|
|
285
|
1
|
|
|
|
|
24
|
$self->{order}->{authorcaptured} = [qw< basionymauthor reference_relation author date non>]; |
286
|
|
|
|
|
|
|
} |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
1; |