words 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/examples.rb +2 -2
- data/lib/words.rb +3 -2
- data/words.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3
|
data/examples.rb
CHANGED
data/lib/words.rb
CHANGED
@@ -12,7 +12,7 @@ module Words
|
|
12
12
|
# We identify each wordnet connector installed and there paths
|
13
13
|
SUPPORTED_CONNECTIORS = Dir[File.join(File.dirname(__FILE__),'wordnet_connectors','*_wordnet_connection.rb')].inject(Hash.new) { |connectors, connection_file| connectors[ File.basename(connection_file).split('_').first.to_sym ] = connection_file; connectors }
|
14
14
|
# An array of tippical wordnet install locations (if you have a standard install somewhere else please open as an issue in github so we can improve!)
|
15
|
-
DEFAULT_WORDNET_LOCATIONS = ['/usr/share/wordnet', '/usr/local/share/wordnet', '/usr/local/WordNet-3.0', '/opt/WordNet-3.0', '/opt/wordnet', '/opt/local/share/WordNet-3.0/', '/usr/local/Cellar/wordnet/3.0']
|
15
|
+
DEFAULT_WORDNET_LOCATIONS = ['/usr/share/wordnet/', '/usr/local/share/wordnet/', '/usr/local/WordNet-3.0/', '/opt/WordNet-3.0/', '/opt/wordnet/', '/opt/local/share/WordNet-3.0/', '/usr/local/Cellar/wordnet/3.0/']
|
16
16
|
|
17
17
|
# Exception to indicate that the wordnet connector specified is not currently available/supported.
|
18
18
|
class BadWordnetConnector < RuntimeError; end
|
@@ -157,8 +157,9 @@ module Words
|
|
157
157
|
end
|
158
158
|
|
159
159
|
base_dirs.each do |dir|
|
160
|
-
["", "dict"].each do |sub_folder|
|
160
|
+
["", "dict/"].each do |sub_folder|
|
161
161
|
path = Pathname.new(dir + sub_folder)
|
162
|
+
puts path
|
162
163
|
return path if (path + "data.noun").exist?
|
163
164
|
end
|
164
165
|
end
|
data/words.gemspec
CHANGED