-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
102 lines (74 loc) · 2.55 KB
/
README
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
*******************************************************************************
wordnet2sql 0.99.4
SOURCE DOCUMENTATION
*******************************************************************************
Let's start off with a little graphic:
+------------------+
+ dictionary-files +
+-+----------------+
|
translatewn.py
|
+-+-------+ +------------+
| rawdata | | staticdata |
+-------+-+ +-+----------+
| |
+ +
\ /
\ /
|
+-----+------+
| data/*.bz2 |
+-----+------+
|
tomysql.sed
|
+----------+-------------+
| data.mysql/*.mysql.bz2 |
+------------------------+
1. If you want to convert WordNet's data-files, first
thing you need is: WordNet!
You can get it from:
http://www.cogsci.princeton.edu/~wn/
2. Next thing: you have to tell wordnet2sql where to
find WordNet. You have to create a file called
config.py
This file might look like:
DICTDIR="/root/wn/dict"
TMPDIR="/tmp"
Use "make sampleconfig" to create this sample-config, and
edit the config.py afterwards.
DICTDIR is the directory, where translatewn.py expects
to find the data.* files from WordNet.
TMPDIR is the directory, where translatewn.py saves
some intermediate objects, for debug purposes only!
Just have a look at translatewn.py, to get an impression
of what exactly that is.
3. The above process may seem a bit complicated, but it
isn't at all. Actually the core of wordnet2sql is
translatewn.py, producing an SQL-File you could without
problems run against any dbms! Try out ./translatewn.py | mysql
if you don't believe me. The other make-targets are just
to create the convenient .bz2 and .mysql.bz2-files you
can find on the homepage.
These are the make-targets:
rawdata:
makes only the "rawdata"-file.
tabs:
makes the files in data/*.tab
mysql:
makes the files in data.mysql/*.mysql
tabs-dist:
makes the files in dist/*.bz2
mysql-dist:
makes the files in dist.mysql/*.mysql.bz2
all:
makes all of the above
clean:
cleans up everything
*******************************************************************************
(c) Copyright 2007 by Richard Bergmair
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation;
*******************************************************************************