parscit/lib/ParsCit/Tr2crfpp.pm in biblicit-2.0.3 vs parscit/lib/ParsCit/Tr2crfpp.pm in biblicit-2.0.4

- old
+ new

@@ -13,11 +13,10 @@ use strict 'vars'; use FindBin; use Encode (); -use Omni::Config; use ParsCit::Config; ### USER customizable section my $tmp_dir = $ParsCit::Config::tmpDir; $tmp_dir = "$FindBin::Bin/../$tmp_dir"; @@ -36,12 +35,10 @@ ### # Huydhn: don't know its function ### my %dict = (); -# Omnilib configuration: object name -my $obj_list = $Omni::Config::obj_list; ### # Huydhn: prepare data for trfpp, segmenting unmarked reference ### sub PrepDataUnmarked @@ -122,11 +119,11 @@ my $ln = $lines->[ $t ]->get_content(); # Trim line $ln =~ s/^\s+|\s+$//g; # Skip blank lines - if (($ln =~ m/^\s*$/) || ($lines->[ $t ]->get_name() ne $obj_list->{ 'OMNILINE' })) + if (($ln =~ m/^\s*$/)) { $addr_index++; next; } @@ -353,11 +350,10 @@ PrepDataUnmarkedToken($last_word, \@feats, \$current); # XML features # Bullet my $bullet = undef; - if ($lines->[ $t ]->get_name() eq $obj_list->{ 'OMNILINE' }) { $bullet = $lines->[ $t ]->get_bullet(); } if ((defined $bullet) && ($bullet eq 'true')) { push @feats, 'xmlBullet_yes'; } else @@ -366,11 +362,10 @@ } $current++; # First word format: bold, italic, font size my $xml_runs = undef; - if (($lines->[ $t ]->get_name() eq $obj_list->{ 'OMNILINE' })) { $xml_runs = $lines->[ $t ]->get_objs_ref(); } # First word format: bold my $bold = undef; if (defined $xml_runs) { $bold = $xml_runs->[ 0 ]->get_bold(); } if ((defined $bold) && ($bold eq 'true')) @@ -413,10 +408,9 @@ } $current++; # First word format: starting point, left alignment my $start_point = undef; - if (($lines->[ $t ]->get_name() eq $obj_list->{ 'OMNILINE' })) { $start_point = $lines->[ $t ]->get_left_pos(); } if ((defined $start_point) && ($start_point > $avg_start_point * $start_upper_ratio)) { push @feats, 'xmlBeginLine_right'; } elsif ((defined $start_point) && ($start_point < $avg_start_point * $start_lower_ratio))