| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package NewsExtractor::SiteSpecificExtractor::www_setn_com; | 
| 2 | 1 |  |  | 1 |  | 8 | use utf8; | 
|  | 1 |  |  |  |  | 2 |  | 
|  | 1 |  |  |  |  | 7 |  | 
| 3 | 1 |  |  | 1 |  | 36 | use Moo; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 5 |  | 
| 4 |  |  |  |  |  |  | extends 'NewsExtractor::GenericExtractor'; | 
| 5 |  |  |  |  |  |  |  | 
| 6 | 1 |  |  | 1 |  | 361 | use Importer 'NewsExtractor::TextUtil' => 'normalize_whitespace'; | 
|  | 1 |  |  |  |  | 3 |  | 
|  | 1 |  |  |  |  | 8 |  | 
| 7 |  |  |  |  |  |  |  | 
| 8 |  |  |  |  |  |  | sub journalist { | 
| 9 | 0 |  |  | 0 | 0 |  | my ($self) = @_; | 
| 10 | 0 |  |  |  |  |  | my $content_text = $self->content_text; | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 0 |  |  |  |  |  | my @patterns = ( | 
| 13 |  |  |  |  |  |  | qr{\b記者\s*([\p{Letter}、]+?)\s*/\s*(?:\p{Letter}+?)報導\b}, | 
| 14 |  |  |  |  |  |  | qr{\b文/([\p{Letter}、]+)\b}, | 
| 15 |  |  |  |  |  |  | qr{\b (?:三立準氣象 | \p{Letter}{2} 中心) / (\p{Letter}+?) 報導\b}x, | 
| 16 |  |  |  |  |  |  | qr{\b健康醫療網記者(\p{Letter}+?)/報導\n}x, | 
| 17 |  |  |  |  |  |  | qr{\b助理編輯/(\p{Letter}+?)\n}x | 
| 18 |  |  |  |  |  |  | ); | 
| 19 |  |  |  |  |  |  |  | 
| 20 | 0 |  |  |  |  |  | my $name; | 
| 21 |  |  |  |  |  |  |  | 
| 22 | 0 |  |  |  |  |  | for my $pat (@patterns) { | 
| 23 | 0 |  |  |  |  |  | ($name) = $content_text =~ $pat; | 
| 24 | 0 | 0 |  |  |  |  | last if defined $name; | 
| 25 |  |  |  |  |  |  | } | 
| 26 |  |  |  |  |  |  |  | 
| 27 | 0 |  | 0 |  |  |  | return $name && normalize_whitespace($name); | 
| 28 |  |  |  |  |  |  | } | 
| 29 |  |  |  |  |  |  |  | 
| 30 |  |  |  |  |  |  | 1; |