wordnet-defaultdb 1.0.1 → 2.0.0
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.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +3 -0
- data.tar.gz.sig +5 -2
- data/History.rdoc +6 -1
- data/LICENSE-bnc.txt +29 -0
- data/LICENSE-fn.txt +96 -0
- data/{LICENSE-WORDNET.txt → LICENSE-legacy.txt} +0 -0
- data/LICENSE-pb.txt +40 -0
- data/LICENSE-pm.txt +6 -0
- data/LICENSE-sqlunet.txt +674 -0
- data/LICENSE-sumo.txt +42 -0
- data/LICENSE-vn.txt +40 -0
- data/LICENSE-wn.txt +31 -0
- data/LICENSE-xwn.txt +34 -0
- data/Manifest.txt +12 -2
- data/README.rdoc +43 -40
- data/Rakefile +43 -43
- data/data/wordnet-defaultdb/wordnet31.sqlite +0 -0
- data/lib/wordnet-defaultdb.rb +3 -21
- data/lib/wordnet/defaultdb.rb +41 -0
- metadata +101 -93
- metadata.gz.sig +0 -0
- data/data/wordnet-defaultdb/wordnet30.sqlite +0 -0
data/LICENSE-sumo.txt
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
LICENSE FOR SUMO
|
|
2
|
+
|
|
3
|
+
Please refer to http://www.ontologyportal.org/
|
|
4
|
+
|
|
5
|
+
SUMO is free and owned by the IEEE.
|
|
6
|
+
The ontologies that extend SUMO are available under GNU General Public License.
|
|
7
|
+
Adam Pease is the Technical Editor of SUMO.
|
|
8
|
+
|
|
9
|
+
Primary paper:
|
|
10
|
+
Niles, I., and Pease, A. 2001. Towards a Standard Upper Ontology. In Proceedings of the 2nd International Conference on Formal Ontology in Information Systems (FOIS-2001), Chris Welty and Barry Smith, eds, Ogunquit, Maine, October 17-19, 2001.
|
|
11
|
+
http://home.earthlink.net/~adampease/professional/FOIS.pdf
|
|
12
|
+
|
|
13
|
+
LICENSE FOR SIGMA
|
|
14
|
+
|
|
15
|
+
This code and documentation are copyright Articulate Software (c)
|
|
16
|
+
2005, 2006, 2007. Some portions copyright Teknowledge (c) 2003
|
|
17
|
+
and reused under the terms of the GNU license. This software is
|
|
18
|
+
released under the GNU Public License
|
|
19
|
+
http://www.gnu.org/copyleft/gpl.html .
|
|
20
|
+
|
|
21
|
+
Users of this code also consent, by use of this code, to credit
|
|
22
|
+
Articulate Software and Teknowledge in any writings, briefings,
|
|
23
|
+
publications, presentations, or other representations of any
|
|
24
|
+
software that incorporates, builds on, or uses this code. Please
|
|
25
|
+
cite the following article in any publication with references:
|
|
26
|
+
|
|
27
|
+
Pease, A., (2003). The Sigma Ontology Development Environment.
|
|
28
|
+
In Working Notes of the IJCAI-2003 Workshop on Ontology and
|
|
29
|
+
Distributed Systems, August 9, Acapulco, Mexico.
|
|
30
|
+
|
|
31
|
+
Note that the current release of Sigma is "beta" code, and is not
|
|
32
|
+
suitable for any mission-critical use. It is strictly a tool for
|
|
33
|
+
research. Sigma comes with no warranty, expressed or implied.
|
|
34
|
+
By using Sigma, you assume all responsibility for events that may
|
|
35
|
+
result, and agree to hold Articulate Software blameless for any
|
|
36
|
+
adverse consequences.
|
|
37
|
+
|
|
38
|
+
Bug reports, fixed code, and new, implemented features are
|
|
39
|
+
welcome, however, and will be shared with the Sigma user
|
|
40
|
+
community.
|
|
41
|
+
Niles, I., and Pease, A. 2001. Towards a Standard Upper Ontology. In Proceedings of the 2nd International Conference on Formal Ontology in Information Systems (FOIS-2001), Chris Welty and Barry Smith, eds, Ogunquit, Maine, October 17-19, 2001.
|
|
42
|
+
http://home.earthlink.net/~adampease/professional/FOIS.pdf
|
data/LICENSE-vn.txt
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
VERBNET
|
|
2
|
+
|
|
3
|
+
This software and database is being provided to you, the LICENSEE, by
|
|
4
|
+
University of Colorado under the following license. By obtaining, using
|
|
5
|
+
and/or copying this software and database, you agree that you have
|
|
6
|
+
read, understood, and will comply with these terms and conditions.:
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify and distribute this software and
|
|
9
|
+
database and its documentation for any purpose and without fee or
|
|
10
|
+
royalty is hereby granted, provided that you agree to comply with
|
|
11
|
+
the following copyright notice and statements, including the disclaimer,
|
|
12
|
+
and that the same appear on ALL copies of the software, database and
|
|
13
|
+
documentation, including modifications that you make for internal
|
|
14
|
+
use or for distribution.
|
|
15
|
+
|
|
16
|
+
VerbNet 2.3 Copyright 2006 by University of Colorado. All rights reserved.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND THE UNIVERSITY
|
|
19
|
+
OF COLORADO MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
20
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, UNIVERSITY
|
|
21
|
+
OF COLORADO MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
|
|
22
|
+
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE
|
|
23
|
+
OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT
|
|
24
|
+
INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
|
|
25
|
+
OTHER RIGHTS.
|
|
26
|
+
|
|
27
|
+
The name of University of Colorado or CU may not be used in
|
|
28
|
+
advertising or publicity pertaining to distribution of the software
|
|
29
|
+
and/or database. Title to copyright in this software, database and
|
|
30
|
+
any associated documentation shall at all times remain with
|
|
31
|
+
University of Colorado and LICENSEE agrees to preserve same.
|
|
32
|
+
|
|
33
|
+
Please reference the following document in any description of
|
|
34
|
+
applications based on VerbNet 2.3:
|
|
35
|
+
|
|
36
|
+
Karin Kipper, Anna Korhonen, Neville Ryant, and Martha Palmer.
|
|
37
|
+
Extensive Classifications of English verbs.
|
|
38
|
+
Proceedings of the 12th EURALEX International Congress. Turin, Italy.
|
|
39
|
+
September, 2006.
|
|
40
|
+
|
data/LICENSE-wn.txt
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
WordNet Release 3.0
|
|
2
|
+
|
|
3
|
+
This software and database is being provided to you, the LICENSEE, by
|
|
4
|
+
Princeton University under the following license. By obtaining, using
|
|
5
|
+
and/or copying this software and database, you agree that you have
|
|
6
|
+
read, understood, and will comply with these terms and conditions.:
|
|
7
|
+
|
|
8
|
+
Permission to use, copy, modify and distribute this software and
|
|
9
|
+
database and its documentation for any purpose and without fee or
|
|
10
|
+
royalty is hereby granted, provided that you agree to comply with
|
|
11
|
+
the following copyright notice and statements, including the disclaimer,
|
|
12
|
+
and that the same appear on ALL copies of the software, database and
|
|
13
|
+
documentation, including modifications that you make for internal
|
|
14
|
+
use or for distribution.
|
|
15
|
+
|
|
16
|
+
WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved.
|
|
17
|
+
|
|
18
|
+
THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND PRINCETON
|
|
19
|
+
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
|
20
|
+
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PRINCETON
|
|
21
|
+
UNIVERSITY MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANT-
|
|
22
|
+
ABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE
|
|
23
|
+
OF THE LICENSED SOFTWARE, DATABASE OR DOCUMENTATION WILL NOT
|
|
24
|
+
INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR
|
|
25
|
+
OTHER RIGHTS.
|
|
26
|
+
|
|
27
|
+
The name of Princeton University or Princeton may not be used in
|
|
28
|
+
advertising or publicity pertaining to distribution of the software
|
|
29
|
+
and/or database. Title to copyright in this software, database and
|
|
30
|
+
any associated documentation shall at all times remain with
|
|
31
|
+
Princeton University and LICENSEE agrees to preserve same.
|
data/LICENSE-xwn.txt
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
XWN 2.0-1.1
|
|
2
|
+
|
|
3
|
+
1. LICENSE
|
|
4
|
+
==========
|
|
5
|
+
|
|
6
|
+
XWN 2.0-1.1 software and database is being provided to you, the LICENSEE,
|
|
7
|
+
by the University of Texas at Dallas under the following license.
|
|
8
|
+
By obtaining, using and/or copying this software and database,
|
|
9
|
+
you agree that you have read, understood, and will comply with
|
|
10
|
+
these terms and conditions:
|
|
11
|
+
|
|
12
|
+
Permission to use, copy, modify and distribute this software and database
|
|
13
|
+
and its documentation for any purpose and without fee or royalty
|
|
14
|
+
is hereby granted, provided that you agree to comply with the following
|
|
15
|
+
copyright notice and statements, including the disclaimer, and that
|
|
16
|
+
the same appear on ALL copies of the software, database and documentation,
|
|
17
|
+
including modifications that you make for internal use or for distribution.
|
|
18
|
+
|
|
19
|
+
eXtended WordNet 2.0-1.1 for WordNet 2.0 Copyright © 2003 by the University of Texas
|
|
20
|
+
at Dallas. All rights reserved.(WordNet is copyrighted by the Princeton University)
|
|
21
|
+
|
|
22
|
+
THIS SOFTWARE AND DATABASE IS PROVIDED "AS IS" AND THE UNIVERSITY OF TEXAS
|
|
23
|
+
AT DALLAS MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED.
|
|
24
|
+
BY WAY OF EXAMPLE, BUT NOT LIMITATION, UNIVERSITY OF TEXAS AT DALLAS
|
|
25
|
+
MAKES NO REPRESENTATIONS OR WARRANTIES OF MERCHANTABILITY OR FITNESS
|
|
26
|
+
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE LICENSED SOFTWARE,
|
|
27
|
+
DATABASE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS,
|
|
28
|
+
COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
|
|
29
|
+
|
|
30
|
+
The name of University of Texas at Dallas may not be used in advertising
|
|
31
|
+
or publicity pertaining to distribution of the software and/or database.
|
|
32
|
+
Title to copyright in this software, database and any associated documentation
|
|
33
|
+
shall at all times remain with University of Texas at Dallas and LICENSEE
|
|
34
|
+
agrees to preserve same.
|
data/Manifest.txt
CHANGED
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
History.rdoc
|
|
2
|
-
LICENSE-
|
|
2
|
+
LICENSE-sqlunet.txt
|
|
3
|
+
LICENSE-bnc.txt
|
|
4
|
+
LICENSE-fn.txt
|
|
5
|
+
LICENSE-legacy.txt
|
|
6
|
+
LICENSE-pb.txt
|
|
7
|
+
LICENSE-pm.txt
|
|
8
|
+
LICENSE-sumo.txt
|
|
9
|
+
LICENSE-vn.txt
|
|
10
|
+
LICENSE-wn.txt
|
|
11
|
+
LICENSE-xwn.txt
|
|
3
12
|
Manifest.txt
|
|
4
13
|
README.rdoc
|
|
5
14
|
Rakefile
|
|
6
|
-
data/wordnet-defaultdb/
|
|
15
|
+
data/wordnet-defaultdb/wordnet31.sqlite
|
|
7
16
|
lib/wordnet-defaultdb.rb
|
|
17
|
+
lib/wordnet/defaultdb.rb
|
data/README.rdoc
CHANGED
|
@@ -1,55 +1,58 @@
|
|
|
1
|
-
|
|
1
|
+
= wordnet_defaultdb
|
|
2
2
|
|
|
3
|
-
*
|
|
3
|
+
* https://bitbucket.org/ged/ruby-wordnet/
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
== Description
|
|
7
7
|
|
|
8
|
-
This gem is a container for the default
|
|
9
|
-
the 'wordnet' gem if you don't have your own installation of the WordNet
|
|
8
|
+
This gem is a container for the default SQLUNet database files loaded by
|
|
9
|
+
the 'wordnet' gem if you don't have your own installation of the WordNet
|
|
10
10
|
databases. It's mostly just a wrapper around the Sqlite database from:
|
|
11
11
|
|
|
12
|
-
http://sourceforge.net/
|
|
12
|
+
http://sqlunet.sourceforge.net/
|
|
13
13
|
|
|
14
14
|
To use it, just install the gem and then create the WordNet::Lexicon with
|
|
15
15
|
no arguments.
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
== Installation
|
|
19
19
|
|
|
20
20
|
gem install wordnet-defaultdb
|
|
21
21
|
|
|
22
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
|
-
|
|
23
|
+
== License
|
|
24
|
+
|
|
25
|
+
This uses the output generated from the SQLUNet project from copyrighted data
|
|
26
|
+
distributed under various other licenses. You can find the licenses of the
|
|
27
|
+
original projects in the various LICENSE-*.txt files included with the
|
|
28
|
+
distribution.
|
|
29
|
+
|
|
30
|
+
The Ruby code included as part of this distribution is:
|
|
31
|
+
|
|
32
|
+
Copyright (c) 2017, Michael Granger
|
|
33
|
+
All rights reserved.
|
|
34
|
+
|
|
35
|
+
Redistribution and use in source and binary forms, with or without
|
|
36
|
+
modification, are permitted provided that the following conditions are met:
|
|
37
|
+
|
|
38
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
39
|
+
this list of conditions and the following disclaimer.
|
|
40
|
+
|
|
41
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
42
|
+
this list of conditions and the following disclaimer in the documentation
|
|
43
|
+
and/or other materials provided with the distribution.
|
|
44
|
+
|
|
45
|
+
* Neither the name of the author/s, nor the names of the project's
|
|
46
|
+
contributors may be used to endorse or promote products derived from this
|
|
47
|
+
software without specific prior written permission.
|
|
48
|
+
|
|
49
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
50
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
51
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
52
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
|
53
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
54
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
55
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
56
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
57
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
58
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/Rakefile
CHANGED
|
@@ -12,19 +12,21 @@ require 'rake/clean'
|
|
|
12
12
|
|
|
13
13
|
$trace = Rake.application.options.trace
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
SQLUNET_VERSION = '5.2.0-31'
|
|
16
|
+
SQLUNET_SHORT_VERSION = SQLUNET_VERSION[ /\A([^-]+)/ ]
|
|
16
17
|
|
|
17
|
-
#
|
|
18
|
+
# https://versaweb.dl.sourceforge.net/project/sqlunet/5.2.0/sqlite/sqlite-5.2.0-31-all.zip
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
SQLUNET_BASE_URI = "https://downloads.sourceforge.net/project/sqlunet/"
|
|
21
|
+
SQLUNET_ZIPFILE = "sqlite-#{SQLUNET_VERSION}-all.zip"
|
|
22
|
+
SQLUNET_URI = "#{SQLUNET_BASE_URI}/#{SQLUNET_SHORT_VERSION}/sqlite/#{SQLUNET_ZIPFILE}"
|
|
22
23
|
|
|
23
|
-
BASEDIR
|
|
24
|
-
DATADIR
|
|
25
|
-
DBDIR
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
BASEDIR = Pathname( __FILE__ ).dirname.relative_path_from( Pathname.pwd )
|
|
25
|
+
DATADIR = BASEDIR + 'data'
|
|
26
|
+
DBDIR = DATADIR + 'wordnet-defaultdb'
|
|
27
|
+
|
|
28
|
+
ORIGINAL_DBFILE = 'sqlite-31.db'
|
|
29
|
+
DEST_DBFILE = DBDIR + 'wordnet31.sqlite'
|
|
28
30
|
|
|
29
31
|
Hoe.plugin :mercurial
|
|
30
32
|
Hoe.plugin :signing
|
|
@@ -35,21 +37,23 @@ hoespec = Hoe.spec 'wordnet-defaultdb' do
|
|
|
35
37
|
self.readme_file = 'README.rdoc'
|
|
36
38
|
self.history_file = 'History.rdoc'
|
|
37
39
|
self.extra_rdoc_files = FileList[ '*.rdoc' ]
|
|
40
|
+
self.license 'BSD-3-Clause'
|
|
38
41
|
|
|
39
42
|
self.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
|
40
43
|
|
|
41
|
-
self.dependency 'wordnet', '~> 1.
|
|
44
|
+
self.dependency 'wordnet', '~> 1.1'
|
|
42
45
|
self.dependency 'sqlite3', '~> 1.3'
|
|
43
|
-
self.dependency 'rubyzip', '~> 0.9', :developer
|
|
44
46
|
|
|
45
|
-
self.
|
|
46
|
-
|
|
47
|
+
self.dependency 'rubyzip', '~> 1.2', :developer
|
|
48
|
+
|
|
49
|
+
self.require_ruby_version( '>=2.3' )
|
|
47
50
|
end
|
|
48
51
|
|
|
49
52
|
ENV['VERSION'] ||= hoespec.spec.version.to_s
|
|
50
53
|
|
|
51
54
|
task :default => :gem
|
|
52
55
|
|
|
56
|
+
task :build => hoespec.spec.files
|
|
53
57
|
|
|
54
58
|
### Make the ChangeLog update if the repo has changed since it was last built
|
|
55
59
|
file '.hg/branch'
|
|
@@ -103,43 +107,39 @@ ensure
|
|
|
103
107
|
end
|
|
104
108
|
|
|
105
109
|
|
|
106
|
-
### Extract the
|
|
107
|
-
def unzip( zipfile,
|
|
108
|
-
require 'zip
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Zip::ZipFile.foreach( zipfile ) do |entry|
|
|
113
|
-
# $stderr.puts " entry is: %p, looking for: %p" % [ entry.name, files ]
|
|
114
|
-
next unless files.empty? || files.include?( entry.name )
|
|
115
|
-
target_path = targetdir + entry.name
|
|
116
|
-
$stderr.puts " extracting: %s" % [ target_path ]
|
|
117
|
-
entry.extract( target_path ) { true }
|
|
118
|
-
files.delete( entry.name )
|
|
119
|
-
break if files.empty?
|
|
120
|
-
end
|
|
110
|
+
### Extract the given +sourcepath+ of the specified +zipfile+ into the given +destpath+.
|
|
111
|
+
def unzip( zipfile, sourcepath, destpath )
|
|
112
|
+
require 'zip'
|
|
113
|
+
|
|
114
|
+
zf = Zip::File.open( zipfile )
|
|
115
|
+
ent = zf.get_entry( sourcepath )
|
|
121
116
|
|
|
122
|
-
|
|
117
|
+
ent.extract( destpath )
|
|
123
118
|
end
|
|
124
119
|
|
|
125
120
|
|
|
126
121
|
# Download the database zipfile
|
|
127
|
-
file
|
|
128
|
-
download
|
|
122
|
+
file SQLUNET_ZIPFILE.to_s do |task|
|
|
123
|
+
download SQLUNET_URI, task.name
|
|
129
124
|
end
|
|
130
|
-
CLOBBER.include(
|
|
125
|
+
CLOBBER.include( SQLUNET_ZIPFILE.to_s )
|
|
131
126
|
|
|
132
127
|
# Extract the database from the downloaded zipfile
|
|
133
|
-
file
|
|
134
|
-
mkdir_p(
|
|
135
|
-
unzip task.prerequisites.first,
|
|
128
|
+
file DEST_DBFILE.to_s => [SQLUNET_ZIPFILE.to_s] do |task|
|
|
129
|
+
mkdir_p( DEST_DBFILE.dirname, :verbose => $trace )
|
|
130
|
+
unzip task.prerequisites.first, ORIGINAL_DBFILE, DEST_DBFILE.to_s
|
|
136
131
|
end
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
132
|
+
CLEAN.include( DEST_DBFILE.to_s )
|
|
133
|
+
CLOBBER.include( DATADIR.to_s )
|
|
134
|
+
|
|
135
|
+
# Extract the license files from the downloaded zipfile
|
|
136
|
+
rule( /^LICENSE-(\w+)\.txt$/ => [ SQLUNET_ZIPFILE.to_s ]) do |task|
|
|
137
|
+
if task.name.include?( 'sqlunet' )
|
|
138
|
+
unzip task.prerequisites.first, "legal/LICENSE", task.name
|
|
139
|
+
else
|
|
140
|
+
unzip task.prerequisites.first, "legal/#{task.name}", task.name
|
|
141
|
+
end
|
|
143
142
|
end
|
|
144
|
-
|
|
143
|
+
|
|
144
|
+
CLEAN.include( 'LICENSE-*.txt' )
|
|
145
145
|
|
|
Binary file
|
data/lib/wordnet-defaultdb.rb
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
# -*- ruby -*-
|
|
2
|
+
#encoding: utf-8
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
# the 'wordnet' gem. It's mostly just a wrapper around the Sqlite database from:
|
|
5
|
-
#
|
|
6
|
-
# http://sourceforge.net/projects/wnsql/
|
|
7
|
-
#
|
|
8
|
-
# == Author/s
|
|
9
|
-
#
|
|
10
|
-
# * Michael Granger <ged@FaerieMUD.org>
|
|
11
|
-
#
|
|
12
|
-
module WordNet
|
|
13
|
-
module DefaultDB
|
|
14
|
-
|
|
15
|
-
# Library version constant
|
|
16
|
-
VERSION = '0.99.0'
|
|
17
|
-
|
|
18
|
-
# Version-control revision constant
|
|
19
|
-
REVISION = %q$Revision: 1188ab2f44d3 $
|
|
20
|
-
|
|
21
|
-
end # module DefaultDB
|
|
22
|
-
end # module Wordnet
|
|
4
|
+
require 'wordnet/defaultdb'
|
|
23
5
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# -*- ruby -*-
|
|
2
|
+
#encoding: utf-8
|
|
3
|
+
|
|
4
|
+
require 'wordnet'
|
|
5
|
+
require 'pathname'
|
|
6
|
+
|
|
7
|
+
# This gem is a container for the default database files required for the
|
|
8
|
+
# 'wordnet' gem. It's mostly just a wrapper around the Sqlite database from
|
|
9
|
+
# SQLUNet:
|
|
10
|
+
#
|
|
11
|
+
# http://sqlunet.sourceforge.net/
|
|
12
|
+
#
|
|
13
|
+
module WordNet::DefaultDB
|
|
14
|
+
|
|
15
|
+
# Library version constant
|
|
16
|
+
VERSION = '2.0.0'
|
|
17
|
+
|
|
18
|
+
# Version-control revision constant
|
|
19
|
+
REVISION = %q$Revision: 7f4d7005a32a $
|
|
20
|
+
|
|
21
|
+
# The data directory which contains the database file
|
|
22
|
+
DATA_DIR = if ENV['WORDNET_DEFAULTDB_DATADIR']
|
|
23
|
+
Pathname( ENV['WORDNET_DEFAULTDB_DATADIR'] )
|
|
24
|
+
elsif Gem.datadir( 'wordnet-defaultdb' ) && File.directory?( Gem.datadir('wordnet-defaultdb') )
|
|
25
|
+
Pathname( Gem.datadir('wordnet-defaultdb') )
|
|
26
|
+
else
|
|
27
|
+
Pathname( __FILE__ ).dirname.parent.parent + 'data/wordnet-defaultdb'
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# The name of the bundled Sqlite database
|
|
31
|
+
DATABASE_FILENAME = 'wordnet31.sqlite'
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Return the Sequel URI for the database
|
|
35
|
+
def self::uri
|
|
36
|
+
dbfile = WordNet::DefaultDB::DATA_DIR + DATABASE_FILENAME
|
|
37
|
+
return nil unless dbfile.exist?
|
|
38
|
+
return "sqlite:%s" % [ dbfile ]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end # module WordNet::DefaultDB
|