wordnet 0.0.5 → 1.0.0.pre.126

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.
Files changed (54) hide show
  1. data/.gemtest +0 -0
  2. data/History.rdoc +5 -0
  3. data/LICENSE +9 -9
  4. data/Manifest.txt +39 -0
  5. data/README.rdoc +60 -0
  6. data/Rakefile +47 -267
  7. data/TODO +9 -0
  8. data/WordNet30-license.txt +31 -0
  9. data/examples/add-laced-boots.rb +35 -0
  10. data/examples/clothes-with-collars.rb +42 -0
  11. data/examples/clothesWithTongues.rb +0 -0
  12. data/examples/domainTree.rb +0 -0
  13. data/examples/memberTree.rb +0 -0
  14. data/lib/wordnet/constants.rb +259 -296
  15. data/lib/wordnet/lexicallink.rb +34 -0
  16. data/lib/wordnet/lexicon.rb +158 -386
  17. data/lib/wordnet/mixins.rb +62 -0
  18. data/lib/wordnet/model.rb +78 -0
  19. data/lib/wordnet/morph.rb +25 -0
  20. data/lib/wordnet/semanticlink.rb +52 -0
  21. data/lib/wordnet/sense.rb +55 -0
  22. data/lib/wordnet/sumoterm.rb +21 -0
  23. data/lib/wordnet/synset.rb +404 -859
  24. data/lib/wordnet/utils.rb +126 -0
  25. data/lib/wordnet/word.rb +119 -0
  26. data/lib/wordnet.rb +113 -76
  27. data/spec/lib/helpers.rb +102 -133
  28. data/spec/linguawordnet.tests.rb +38 -0
  29. data/spec/wordnet/lexicon_spec.rb +96 -186
  30. data/spec/wordnet/model_spec.rb +59 -0
  31. data/spec/wordnet/semanticlink_spec.rb +42 -0
  32. data/spec/wordnet/synset_spec.rb +27 -256
  33. data/spec/wordnet/word_spec.rb +58 -0
  34. data/spec/wordnet_spec.rb +52 -0
  35. data.tar.gz.sig +0 -0
  36. metadata +227 -188
  37. metadata.gz.sig +0 -0
  38. data/ChangeLog +0 -720
  39. data/README +0 -93
  40. data/Rakefile.local +0 -46
  41. data/convertdb.rb +0 -417
  42. data/examples/addLacedBoots.rb +0 -27
  43. data/examples/clothesWithCollars.rb +0 -36
  44. data/rake/dependencies.rb +0 -76
  45. data/rake/helpers.rb +0 -384
  46. data/rake/manual.rb +0 -755
  47. data/rake/packaging.rb +0 -112
  48. data/rake/publishing.rb +0 -303
  49. data/rake/rdoc.rb +0 -35
  50. data/rake/style.rb +0 -62
  51. data/rake/svn.rb +0 -469
  52. data/rake/testing.rb +0 -192
  53. data/rake/verifytask.rb +0 -64
  54. 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: