wordnet 0.0.5 → 1.0.0.pre.126
Sign up to get free protection for your applications and to get access to all the features.
- data/.gemtest +0 -0
- data/History.rdoc +5 -0
- data/LICENSE +9 -9
- data/Manifest.txt +39 -0
- data/README.rdoc +60 -0
- data/Rakefile +47 -267
- data/TODO +9 -0
- data/WordNet30-license.txt +31 -0
- data/examples/add-laced-boots.rb +35 -0
- data/examples/clothes-with-collars.rb +42 -0
- data/examples/clothesWithTongues.rb +0 -0
- data/examples/domainTree.rb +0 -0
- data/examples/memberTree.rb +0 -0
- data/lib/wordnet/constants.rb +259 -296
- data/lib/wordnet/lexicallink.rb +34 -0
- data/lib/wordnet/lexicon.rb +158 -386
- data/lib/wordnet/mixins.rb +62 -0
- data/lib/wordnet/model.rb +78 -0
- data/lib/wordnet/morph.rb +25 -0
- data/lib/wordnet/semanticlink.rb +52 -0
- data/lib/wordnet/sense.rb +55 -0
- data/lib/wordnet/sumoterm.rb +21 -0
- data/lib/wordnet/synset.rb +404 -859
- data/lib/wordnet/utils.rb +126 -0
- data/lib/wordnet/word.rb +119 -0
- data/lib/wordnet.rb +113 -76
- data/spec/lib/helpers.rb +102 -133
- data/spec/linguawordnet.tests.rb +38 -0
- data/spec/wordnet/lexicon_spec.rb +96 -186
- data/spec/wordnet/model_spec.rb +59 -0
- data/spec/wordnet/semanticlink_spec.rb +42 -0
- data/spec/wordnet/synset_spec.rb +27 -256
- data/spec/wordnet/word_spec.rb +58 -0
- data/spec/wordnet_spec.rb +52 -0
- data.tar.gz.sig +0 -0
- metadata +227 -188
- metadata.gz.sig +0 -0
- data/ChangeLog +0 -720
- data/README +0 -93
- data/Rakefile.local +0 -46
- data/convertdb.rb +0 -417
- data/examples/addLacedBoots.rb +0 -27
- data/examples/clothesWithCollars.rb +0 -36
- data/rake/dependencies.rb +0 -76
- data/rake/helpers.rb +0 -384
- data/rake/manual.rb +0 -755
- data/rake/packaging.rb +0 -112
- data/rake/publishing.rb +0 -303
- data/rake/rdoc.rb +0 -35
- data/rake/style.rb +0 -62
- data/rake/svn.rb +0 -469
- data/rake/testing.rb +0 -192
- data/rake/verifytask.rb +0 -64
- data/utils.rb +0 -838
data/rake/verifytask.rb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
#####################################################################
|
2
|
-
### S U B V E R S I O N T A S K S A N D H E L P E R S
|
3
|
-
#####################################################################
|
4
|
-
|
5
|
-
require 'rake/tasklib'
|
6
|
-
|
7
|
-
#
|
8
|
-
# Work around the inexplicable behaviour of the original RDoc::VerifyTask, which
|
9
|
-
# errors if your coverage isn't *exactly* the threshold.
|
10
|
-
#
|
11
|
-
|
12
|
-
# A task that can verify that the RCov coverage doesn't
|
13
|
-
# drop below a certain threshold. It should be run after
|
14
|
-
# running Spec::Rake::SpecTask.
|
15
|
-
class VerifyTask < Rake::TaskLib
|
16
|
-
|
17
|
-
COVERAGE_PERCENTAGE_PATTERN =
|
18
|
-
%r{<tt class='coverage_code'>(\d+\.\d+)%</tt>}
|
19
|
-
|
20
|
-
# Name of the task. Defaults to :verify_rcov
|
21
|
-
attr_accessor :name
|
22
|
-
|
23
|
-
# Path to the index.html file generated by RCov, which
|
24
|
-
# is the file containing the total coverage.
|
25
|
-
# Defaults to 'coverage/index.html'
|
26
|
-
attr_accessor :index_html
|
27
|
-
|
28
|
-
# Whether or not to output details. Defaults to true.
|
29
|
-
attr_accessor :verbose
|
30
|
-
|
31
|
-
# The threshold value (in percent) for coverage. If the
|
32
|
-
# actual coverage is not equal to this value, the task will raise an
|
33
|
-
# exception.
|
34
|
-
attr_accessor :threshold
|
35
|
-
|
36
|
-
def initialize( name=:verify )
|
37
|
-
@name = name
|
38
|
-
@index_html = 'coverage/index.html'
|
39
|
-
@verbose = true
|
40
|
-
yield self if block_given?
|
41
|
-
raise "Threshold must be set" if @threshold.nil?
|
42
|
-
define
|
43
|
-
end
|
44
|
-
|
45
|
-
def define
|
46
|
-
desc "Verify that rcov coverage is at least #{threshold}%"
|
47
|
-
|
48
|
-
task @name do
|
49
|
-
total_coverage = nil
|
50
|
-
if match = File.read( index_html ).match( COVERAGE_PERCENTAGE_PATTERN )
|
51
|
-
total_coverage = Float( match[1] )
|
52
|
-
else
|
53
|
-
raise "Couldn't find the coverage percentage in #{index_html}"
|
54
|
-
end
|
55
|
-
|
56
|
-
puts "Coverage: #{total_coverage}% (threshold: #{threshold}%)" if verbose
|
57
|
-
if total_coverage < threshold
|
58
|
-
raise "Coverage must be at least #{threshold}% but was #{total_coverage}%"
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
# vim: set nosta noet ts=4 sw=4:
|