line |
true |
false |
branch |
52
|
0 |
0 |
unless my $v2t = $coldb->mmclass($DiaColloDB::MMCLASS)->new('base', $base, 'flags', 'rw', 'perms', $coldb->{'perms'}, 'pack_i', $pack_id, 'pack_o', $coldb->{'pack_off'}, 'pack_l', $coldb->{'pack_id'})
|
53
|
0 |
0 |
unless $v2t->fromArray(\@v2ti)
|
55
|
0 |
0 |
unless $v2t->flush
|
67
|
0 |
0 |
if UNIVERSAL::isa($attrs, 'ARRAY')
|
68
|
0 |
0 |
if defined $_
|
109
|
0 |
0 |
if UNIVERSAL::isa($_[0], 'DiaColloDB')
|
118
|
0 |
0 |
if exists $ATTR_TITLE{$attr}
|
127
|
0 |
0 |
if (exists $ATTR_CBEXPR{$attr})
|
131
|
0 |
0 |
if ($attr =~ /^doc\.(.*)$/) { }
|
144
|
0 |
0 |
$cquery ? :
|
145
|
0 |
0 |
if ($attr =~ /^doc\./)
|
169
|
0 |
0 |
unless defined $_[1]
|
182
|
0 |
0 |
unless ref $coldb
|
189
|
0 |
0 |
unless my $dbdir = $coldb->{'dbdir'}
|
192
|
0 |
0 |
unless not -d $dbdir or remove_tree($dbdir)
|
195
|
0 |
0 |
unless make_path($dbdir)
|
200
|
0 |
0 |
if ($coldb->{'index_tdf'})
|
201
|
0 |
0 |
if (not require 'DiaColloDB/Relation/TDF.pm') { }
|
202
|
0 |
0 |
$@ ? :
|
233
|
0 |
0 |
if $attr =~ /^(?:meta|doc)\.(.*)$/
|
247
|
0 |
0 |
unless CORE::open my $atokfh, '>:raw', $atokfile
|
254
|
0 |
0 |
if ($index_tdf)
|
255
|
0 |
0 |
unless $docmeta = $coldb->{'docmeta'} = tmparray("$dbdir/docmeta", 'UNLINK', !$coldb->{'keeptmp'}, 'pack_o', 'J', 'pack_l', 'J')
|
258
|
0 |
0 |
unless $docoff = $coldb->{'docoff'} = tmparrayp("$dbdir/docoff", 'J', 'UNLINK', !$coldb->{'keeptmp'})
|
261
|
0 |
0 |
unless $dbreak =~ /^#/
|
265
|
0 |
0 |
if (not UNIVERSAL::isa($corpus, 'DiaColloDB::Corpus::Compiled')) { }
|
273
|
0 |
0 |
unless $corpus = $corpus->compile("$dbdir/corpus.d", 'njobs', $DiaColloDB::NJOBS, 'filters', $coldb->corpusFilters, 'logFileN', max2(1, $corpus->size / 10), 'temp', !$coldb->{'keeptmp'})
|
280
|
0 |
0 |
if (($dbfilters->{$key} // '') ne ($cfilters->{$key} // ''))
|
300
|
0 |
0 |
if $logFileN and $filei++ % $logFileN == 0
|
309
|
0 |
0 |
if $date < $xdmin
|
310
|
0 |
0 |
if $date > $xdmax
|
319
|
0 |
0 |
if (ref $tok) { }
|
|
0 |
0 |
elsif (not defined $tok || $last_was_eos) { }
|
|
0 |
0 |
elsif (defined $tok and $tok eq $dbreak and $docoff and $docoff_cur < $toki) { }
|
342
|
0 |
0 |
if ($docoff and $docoff_cur < $toki)
|
349
|
0 |
0 |
if ($docmeta)
|
359
|
0 |
0 |
if $docoff
|
365
|
0 |
0 |
unless CORE::close $atokfh
|
369
|
0 |
0 |
if $corpus->{'temp'}
|
375
|
0 |
0 |
if ($afmin // '') eq ''
|
376
|
0 |
0 |
if $afmin <= 0
|
385
|
0 |
0 |
unless my $cmdfh = opencmd(sortCmd() . qq[ -nk$ai1 $atokfile | cut -d" " -f $ai1 | uniq -c |])
|
392
|
0 |
0 |
$f >= $afmin ? :
|
|
0 |
0 |
if $i
|
398
|
0 |
0 |
$ac->{'ns'} ? :
|
405
|
0 |
0 |
if (($j = $i2j->[$i]) == $ibad) { }
|
421
|
0 |
0 |
if ($tfmin > 0 or grep {defined $_->{'i2j'};} @$aconf)
|
423
|
0 |
0 |
defined $_->{'i2j'} ? :
|
430
|
0 |
0 |
unless my $cmdfh = opencmd('sort ' . join(' ', map({"-nk$_";} 1 .. $na)) . qq[ $atokfile | cut -d" " -f -$na | uniq -c |])
|
437
|
0 |
0 |
if not $aistr or $f < $tfmin
|
442
|
0 |
0 |
if $ais[$_] == $ibad
|
451
|
0 |
0 |
$nw0 ? :
|
458
|
0 |
0 |
unless CORE::open my $tokfh, '>:raw', $tokfile
|
461
|
0 |
0 |
unless CORE::open my $vtokfh, '>:raw', $vtokfile
|
463
|
0 |
0 |
unless CORE::open $atokfh, '<:raw', $atokfile
|
469
|
0 |
0 |
if $docoff
|
470
|
0 |
0 |
$docoff ? :
|
473
|
0 |
0 |
if ($_) { }
|
474
|
0 |
0 |
if ($toki_in == $docoff_in)
|
477
|
0 |
0 |
if ($debug)
|
479
|
0 |
0 |
unless defined $doci_cur
|
481
|
0 |
0 |
unless defined $toki_out
|
483
|
0 |
0 |
unless defined $docoff->[$doci_cur]
|
485
|
0 |
0 |
unless defined $$docoff[$doci_cur + 1]
|
494
|
0 |
0 |
if s/ ([0-9]+)$//
|
495
|
0 |
0 |
if (defined $ts2t) { }
|
496
|
0 |
0 |
unless defined($t = $ts2t->{$_})
|
500
|
0 |
0 |
unless defined($ti = $ts2i->{$t})
|
510
|
0 |
0 |
if ($docoff)
|
518
|
0 |
0 |
unless CORE::close $atokfh
|
520
|
0 |
0 |
unless CORE::close $tokfh
|
522
|
0 |
0 |
unless CORE::close $vtokfh
|
525
|
0 |
0 |
$ntok_in ? :
|
534
|
0 |
0 |
unless $tenum->save("$dbdir/tenum")
|
542
|
0 |
0 |
unless $ac->{'enum'}->save("$dbdir/$ac->{'a'}_enum")
|
550
|
0 |
0 |
if ($coldb->{'index_xf'} // 1) { }
|
553
|
0 |
0 |
unless my $xfdb = $coldb->{'xf'} = 'DiaColloDB::Relation::Unigrams'->new('base', "$dbdir/xf", 'flags', $flags, 'mmap', $coldb->{'mmap'}, 'pack_i', $pack_id, 'pack_f', $pack_f, 'pack_d', $pack_date)
|
555
|
0 |
0 |
unless $xfdb->create($coldb, $tokfile)
|
562
|
0 |
0 |
if ($coldb->{'index_cof'} // 1) { }
|
569
|
0 |
0 |
unless my $cof = $coldb->{'cof'} = 'DiaColloDB::Relation::Cofreqs'->new('base', "$dbdir/cof", 'flags', $flags, 'mmap', $coldb->{'mmap'}, 'pack_i', $pack_id, 'pack_f', $pack_f, 'pack_d', $pack_date, 'dmax', $coldb->{'dmax'}, 'fmin', $coldb->{'cfmin'}, 'keeptmp', $coldb->{'keeptmp'})
|
570
|
0 |
0 |
unless $cof->create($coldb, $tokfile)
|
577
|
0 |
0 |
if ($coldb->{'index_tdf'}) { }
|
587
|
0 |
0 |
if ($coldb->{'ddcServer'}) { }
|
595
|
0 |
0 |
unless $coldb->saveHeader
|
602
|
0 |
0 |
unless not $docmeta && tied @$docmeta or untie @$docmeta
|
608
|
0 |
0 |
unless not $docoff && tied @$docoff or untie @$docoff
|
614
|
0 |
0 |
unless ($coldb->{'keeptmp'})
|
616
|
0 |
0 |
unless unlink $_
|
633
|
0 |
0 |
unless ref $coldb
|
635
|
0 |
0 |
ref $_ ? :
|
642
|
0 |
0 |
if 'version'->parse($dbversion) < $min_db_version
|
648
|
0 |
0 |
unless my $dbdir = $coldb->{'dbdir'}
|
651
|
0 |
0 |
unless not -d $dbdir or remove_tree($dbdir)
|
654
|
0 |
0 |
unless make_path($dbdir)
|
660
|
0 |
0 |
unless (@$attrs)
|
665
|
0 |
0 |
if exists $akeys{$dba} or grep {not exists $_->{$dba};} @dbakeys
|
671
|
0 |
0 |
unless @$attrs
|
705
|
0 |
0 |
$dbenum ? :
|
|
0 |
0 |
unless $$db{"_union_${attr}i2u"} = 'DiaColloDB::PackedFile'->new('file', "$dbdir/${attr}_i2u.tmp$argi", 'flags', 'rw', 'packas', $coldb->{'pack_id'})->fromArray([@$as2i{$dbenum ? @{$dbenum->toArray;} : ''}])
|
709
|
0 |
0 |
unless $aenum->save("$dbdir/${attr}_enum")
|
717
|
0 |
0 |
if not defined $coldb->{'xdmin'} or $db->{'xdmin'} < $coldb->{'xdmin'}
|
718
|
0 |
0 |
if not defined $coldb->{'xdmax'} or $db->{'xdmax'} > $coldb->{'xdmax'}
|
744
|
0 |
0 |
exists $a2dbti{$_} ? :
|
747
|
0 |
0 |
unless defined($uti = $ts2i->{$uts})
|
751
|
0 |
0 |
unless $ti2u->flush
|
754
|
0 |
0 |
unless $tenum->save("$dbdir/tenum")
|
766
|
0 |
0 |
if ($coldb->{'index_xf'} // 1) { }
|
772
|
0 |
0 |
unless $coldb->{'xf'} = 'DiaColloDB::Relation::Unigrams'->new('base', "$dbdir/xf", 'flags', $flags, 'mmap', $coldb->{'mmap'}, 'pack_i', $pack_id, 'pack_f', $pack_f, 'pack_d', $pack_date, 'keeptmp', $coldb->{'keeptmp'})
|
773
|
0 |
0 |
unless $coldb->{'xf'}->union($coldb, [map({[@$_{'xf', '_union_ti2u'}];} @dbargs)])
|
780
|
0 |
0 |
if ($coldb->{'index_cof'} // 1) { }
|
787
|
0 |
0 |
unless $coldb->{'cof'} = 'DiaColloDB::Relation::Cofreqs'->new('base', "$dbdir/cof", 'flags', $flags, 'mmap', $coldb->{'mmap'}, 'pack_i', $pack_id, 'pack_f', $pack_f, 'pack_d', $pack_date, 'dmax', $coldb->{'dmax'}, 'fmin', $coldb->{'cfmin'}, 'keeptmp', $coldb->{'keeptmp'})
|
788
|
0 |
0 |
unless $coldb->{'cof'}->union($coldb, [map({[@$_{'cof', '_union_ti2u'}];} @dbargs)])
|
797
|
0 |
0 |
if ($coldb->{'index_tdf'} and $db_tdf) { }
|
806
|
0 |
0 |
unless $dbreak =~ /^#/
|
813
|
0 |
0 |
unless $coldb->{'tdf'} = 'DiaColloDB::Relation::TDF'->union($coldb, \@dbargs, 'base', "$dbdir/tdf", 'flags', $flags, 'keeptmp', $coldb->{'keeptmp'}, %{$$coldb{'tdfopts'};})
|
821
|
0 |
0 |
unless ($coldb->{'keeptmp'})
|
825
|
0 |
0 |
if $db->{$pfkey}->can('unlink')
|
834
|
0 |
0 |
unless $coldb->saveHeader
|