biblicit 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/biblicit/parscit.rb
CHANGED
data/lib/biblicit/version.rb
CHANGED
|
@@ -17,6 +17,8 @@ package HeaderParse::API::ParserMethods;
|
|
|
17
17
|
|
|
18
18
|
use utf8;
|
|
19
19
|
use Data::Dumper;
|
|
20
|
+
use File::Temp qw(tempdir);
|
|
21
|
+
use File::Path qw(remove_tree);
|
|
20
22
|
use HeaderParse::API::NamePatternMatch;
|
|
21
23
|
use HeaderParse::API::MultiClassChunking; #default to use all export by this module
|
|
22
24
|
use HeaderParse::API::LoadInformation;
|
|
@@ -83,9 +85,10 @@ sub Parse{
|
|
|
83
85
|
my $header=shift;
|
|
84
86
|
$timestamp = shift;
|
|
85
87
|
my $success = 0;
|
|
86
|
-
my $
|
|
88
|
+
my $Local_Tmpdir = tempdir(DIR => $Tmp_Dir, CLEANUP => 1);
|
|
89
|
+
my $tmpCacheVec = "$Local_Tmpdir/tmpVec"."\_$timestamp\_";
|
|
87
90
|
|
|
88
|
-
my $SVMTmpResult = "$
|
|
91
|
+
my $SVMTmpResult = "$Local_Tmpdir/tmpresult"."\_$timestamp\_";
|
|
89
92
|
$TestH = &HashEbizHeader(\$header);
|
|
90
93
|
$TestH = &VectorizeUnknownHeaderLine($TestH);
|
|
91
94
|
|
|
@@ -124,10 +127,7 @@ sub Parse{
|
|
|
124
127
|
}
|
|
125
128
|
$rXML = &ExportRDF($TestH);
|
|
126
129
|
|
|
127
|
-
|
|
128
|
-
unlink "$Tmp_Dir/tmpVec\_$timestamp\_test$i";
|
|
129
|
-
unlink "$Tmp_Dir/tmpresult\_$timestamp\_$i";
|
|
130
|
-
}
|
|
130
|
+
remove_tree($Local_Tmpdir);
|
|
131
131
|
return $rXML;
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -414,6 +414,7 @@ sub LineClassify() {
|
|
|
414
414
|
for my $clsNO(1 .. 15) {
|
|
415
415
|
my $testF = "$tmpCacheVec"."test"."$clsNO";
|
|
416
416
|
open(testFH, ">$testF") || die "SVMHeaderParse: could not open $testF to write: $!";
|
|
417
|
+
|
|
417
418
|
# foreach my $HeaNO (sort {$a <=> $b} keys %{$HeaderH}) {
|
|
418
419
|
foreach my $LN(sort {$a <=> $b} keys %{$HeaderH}) {
|
|
419
420
|
my $tag = 1; # just to conform to the format
|
metadata
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
name: biblicit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 2.3.
|
|
5
|
+
version: 2.3.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- David Judd
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2013-
|
|
12
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|