biblicit 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  perl/log/*
2
2
  perl/HeaderParseService/tmp/*
3
3
  Gemfile.lock
4
+ pkg
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Biblicit
4
4
 
5
- VERSION = '2.0.5'
5
+ VERSION = '2.0.6'
6
6
 
7
7
  end
data/parscit/INSTALL CHANGED
@@ -40,12 +40,24 @@ These are the two scripts: citeExtract.pl and parseRefStrings.pl. The
40
40
  second script is a subset of the first, and should be your first
41
41
  target to get running.
42
42
 
43
- 1) You will first need to reinstall, recompile the crfpp package and
44
- place the binaries at crfpp/. We are using CRF++ version 0.51. To do
45
- this follow these instructions in the crfpp directory. CRF++ is the
43
+ 1) You will first need to install CRF++. CRF++ is the
46
44
  core conditional random field learner, that is re-distributed in this
47
- ParsCit software. It is due to Taku Kudo.
48
-
45
+ ParsCit software. It is due to Taku Kudo. We are using CRF++ version 0.51.
46
+
47
+ You have two options:
48
+ a) You may install CRF++ anywhere, and set the environment variable
49
+ CRFPP_HOME to tell ParsCit where to find it. CRFPP_HOME should be set
50
+ such that "$CRFPP_HOME/bin" contains the binaries crf_test and crf_learn.
51
+ For example if you run a default "make install" on Linux and those
52
+ binaries are installed to "/usr/local/bin", CRFPP_HOME should be
53
+ "/usr/local".
54
+
55
+ b) You may place the binaries in the crfpp/ directory within the ParsCit
56
+ source. You do not then need to set any environment variables, although
57
+ you may need to edit Config.pm files.
58
+
59
+ Installation methods:
60
+ a) From source, in the crfpp directory:
49
61
  $ cd crfpp
50
62
  # we're going to rebuild CRF 51
51
63
  $ rm -Rf CRF++-0.51
@@ -71,9 +83,19 @@ ParsCit software. It is due to Taku Kudo.
71
83
  $ cd .libs
72
84
  $ cp -Rf * ../../.libs
73
85
 
74
- 2) Once the binaries are placed properly, you may need to edit the
86
+ b) With apt, on a Debian-based Linux distribution:
87
+ sudo apt-add-repository 'deb http://cl.naist.jp/~eric-n/ubuntu-nlp oneiric all'
88
+ sudo apt-get update
89
+ sudo apt-get install libcrf++-dev crf++
90
+
91
+ c) With Homebrew, on OS X:
92
+ brew install crf++
93
+
94
+ 2) Once the binaries are placed properly, if you are not using the
95
+ CRFPP_HOME environment variable, you may need to edit the
75
96
  lib/ParsCit/Config.pm file to point to the proper directories on your
76
- machine.
97
+ machine. If you are using CRFPP_HOME, you may want to set it in
98
+ your .bashrc or .profile file.
77
99
 
78
100
  3) Edit the shebang lines (first line) of the scripts in the bin/
79
101
  directory to point to the proper versions of perl
@@ -18,8 +18,9 @@ my $parscitHome = "$FindBin::Bin/../..";
18
18
  my $tr2crfppLoc = "$parscitHome/bin/parsHed/tr2crfpp_parsHed.pl";
19
19
  my $convertLoc = "$parscitHome/bin/parsHed/convert2TokenLevel.pl"; #new model
20
20
  my $keywordLoc = "$parscitHome/bin/parsHed/keywordGen.pl"; #new model
21
- my $crf_learnLoc = "$ENV{'CRFPP_HOME'}/bin/crf_learn";
22
- my $crf_testLoc = "$ENV{'CRFPP_HOME'}/bin/crf_test";
21
+ my $crfpp = $ENV{'CRFPP_HOME'} ? "$ENV{'CRFPP_HOME'}/bin" : "$parscitHome/crfpp";
22
+ my $crf_learnLoc = "$crfpp/crf_learn";
23
+ my $crf_testLoc = "$crfpp/crf_test";
23
24
  my $conllevalLoc = "$parscitHome/bin/conlleval.pl";
24
25
  ### END user customizable section
25
26
 
@@ -10,8 +10,9 @@ $0 =~ /([^\/]+)$/; my $progname = $1;
10
10
  my $outputVersion = "1.0";
11
11
  my $parscitHome = "/home/wing.nus/services/parscit/tools/";
12
12
  my $tr2crfppLoc = "$parscitHome/bin/tr2crfpp.pl";
13
- my $crf_learnLoc = "$ENV{'CRFPP_HOME'}/bin/crf_learn";
14
- my $crf_testLoc = "$ENV{'CRFPP_HOME'}/bin/crf_test";
13
+ my $crfpp = $ENV{'CRFPP_HOME'} ? "$ENV{'CRFPP_HOME'}/bin" : "$parscitHome/crfpp";
14
+ my $crf_learnLoc = "$crfpp/crf_learn";
15
+ my $crf_testLoc = "$crfpp/crf_test";
15
16
  my $conllevalLoc = "$parscitHome/bin/conlleval.pl";
16
17
  my $crfTemplateLoc = "$parscitHome/crfpp/traindata/parsCit.template";
17
18
  ### END user customizable section
@@ -4,7 +4,7 @@ require 'find'
4
4
 
5
5
  pwd = File.dirname(__FILE__)
6
6
 
7
- @CRFPP = "#{ENV['CRFPP_HOME']}/bin"
7
+ @CRFPP = ENV['CRFPP_HOME'] ? "#{ENV['CRFPP_HOME']}/bin" : "#{pwd}/../../../crfpp"
8
8
  @RESOURCES = "#{pwd}/../../../crfpp/traindata/"
9
9
  @TEST_DIR = "#{pwd}/run"
10
10
  @CONLLEVAL = "#{pwd}/../../conlleval.pl"
@@ -5,7 +5,7 @@ require 'find'
5
5
 
6
6
  pwd = File.dirname(__FILE__)
7
7
 
8
- @CRFPP = "#{ENV['CRFPP_HOME']}/bin"
8
+ @CRFPP = ENV['CRFPP_HOME'] ? "#{ENV['CRFPP_HOME']}/bin" : "#{pwd}/../../crfpp"
9
9
  @SRC = "#{pwd}/genericSect"
10
10
  @DATA = "#{pwd}/../../resources/sectLabel/"
11
11
  @TEST_DIR = "/tmp/"
@@ -27,8 +27,9 @@ my $outputVersion = "1.0";
27
27
 
28
28
  my $tr2crfppLoc = "$path/tr2crfpp.pl";
29
29
  my $keywordLoc = "$path/keywordGen.pl"; #new model
30
- my $crf_learnLoc = "$ENV{'CRFPP_HOME'}/bin/crf_learn";
31
- my $crf_testLoc = "$ENV{'CRFPP_HOME'}/bin/crf_test";
30
+ my $crfpp = $ENV{'CRFPP_HOME'} ? "$ENV{'CRFPP_HOME'}/bin" : "$path/../../crfpp";
31
+ my $crf_learnLoc = "$crfpp/crf_learn";
32
+ my $crf_testLoc = "$crfpp/crf_test";
32
33
  my $conllevalLoc = "$path/../conlleval.pl";
33
34
  ### END user customizable section
34
35