forked from daltonj/KbBridge
-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
85 lines (61 loc) · 2.77 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
================================================
Installation prerequesites for using KbBridge
================================================
-------------------------
Before compiling KbBridge
-------------------------
1) Install protobuf
If you are working on Ubuntu, use:
sudo apt-get install protobuf-compiler
You may have to fix the path with
sudo ln -s /usr/bin/protoc /usr/local/bin/protoc
For other Operating Systems, download from here: https://developers.google.com/protocol-buffers/
2) Download and Install CIIR_Shared
Download or clone repository from: https://github.com/daltonj/CIIRShared
From inside the directory call
mvn install
3) Download and install LingPipe 4.1.0
Download and unpack from: http://alias-i.com/lingpipe/web/download.html
From download location call
mvn install:install-file -Dfile=lingpipe-4.1.0.jar -DgroupId=com.aliasi -DartifactId=lingpipe -Dversion=4.1.0 -Dpackaging=jar
------------------
Compiling KbBridge
------------------
cd into the kbbridge directory (where the pom.xml is located)
mvn clean compile
If you experience any errors, please contact us.
--------------------
Configuring KbBridge
--------------------
create a copy of resources/kbbridge-blake.properties and place it in resources/kbbridge.properties
(Alternatively, you can also place it in resources/kbbridge-$username@$computername.properties)
Make sure all paths are available on your system
Check paths in ../config/galago-fullwiki
Either obtain the Wikipedia index from us, or create your own, see below.
-----------------
Running KbBridge
-----------------
KbBridge is meant to be a framework that you adapt to your needs.
For an example, run the class "EntityLinkerMain".
-------------------
Index your own Data
-------------------
If do not want to use our Wikipedia index, you can create your own from an annotated WEX dump
You need to gave Galago3.4 installed and access to the binary "galago"
create a json file "wikiparser.json" with this content:
---------------------------------
{
"filetype" : "wex" ,
"parser" : {
"externalParsers" : [
{
"filetype" : "wex",
"class" : "org.lemurproject.galago.core.parse.WikiWexParser"
}
]
}
}
----------------------------------
Call
core/target/appassembler/bin/galago build --tokenizer/fields+title --tokenizer/fields+title-exact --tokenizer/fields+fbname --tokenizer/fields+fbname-exact --tokenizer/fields+fbtype --tokenizer/fields+category --tokenizer/fields+redirect --tokenizer/fields+redirect-exact --tokenizer/fields+kb_class --tokenizer/fields+anchor --tokenizer/fields+anchor-exact --tokenizer/fields+text --tokenizer/fields+stanf_anchor --tokenizer/fields+stanf_anchor-exact --indexPath=$indexdir --inputPath+$inputdir wikiparser.json
And add $indexname to ../config/galago-fullwiki (full paths required)