summarize 1.0.0 → 1.0.1

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.
data/.gitignore CHANGED
@@ -1,6 +1,7 @@
1
1
  Makefile
2
- lib/ots/ots.bundle
2
+ lib/**/*.bundle
3
3
  tmp/*
4
+ doc/*
4
5
  *.DS_Store
5
6
  coverage/*
6
7
  *.swp
data/README.markdown CHANGED
@@ -1,14 +1,16 @@
1
- # Summarize
1
+ ## Summarize - A Ruby C wrapper for Open Text Summarizer
2
2
 
3
- ## A Ruby C wrapper for Open Text Summarizer
3
+ ## Installation
4
4
 
5
- ## Install
5
+ ### Easy
6
6
 
7
- ### Manual install
7
+ gem install summarize
8
+
9
+ ### Manual
8
10
 
9
11
  git clone https://github.com/ssoper/summarize.git
10
12
  cd summarize
11
- rake build # install the rake-compiler gem if you dont already have it
13
+ rake build
12
14
  gem build summarize.gemspec
13
15
  gem install summarize-1.0.gem
14
16
 
data/lib/summarize.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'summarize/summarize'
2
2
 
3
- class Hash
3
+ class Hash #:nodoc:
4
4
  def symbolize_keys
5
5
  inject({}) do |options, (key, value)|
6
6
  options[(key.to_sym rescue key) || key] = value
@@ -10,7 +10,7 @@ class Hash
10
10
  end unless {}.respond_to? 'symbolize_keys'
11
11
 
12
12
  module Summarize
13
- VERSION = "1.0.0"
13
+ VERSION = "1.0.1"
14
14
 
15
15
  LANGUAGES = [
16
16
  'bg', # Bulgarian
@@ -52,7 +52,7 @@ module Summarize
52
52
  'yi' # Yiddish
53
53
  ]
54
54
 
55
- def self.parse_options(options = {})
55
+ def self.parse_options(options = {}) #:nodoc:
56
56
  default_options = {
57
57
  :ratio => 25, # percentage
58
58
  :language => 'en' # ISO 639-1 code
@@ -75,6 +75,18 @@ end
75
75
  class String
76
76
  extend Summarize
77
77
 
78
+ # Summarizes a string
79
+ #
80
+ # == Options:
81
+ # ratio::
82
+ # A Fixnum from 0 to 100
83
+ #
84
+ # language::
85
+ # An ISO 639-1 language code. See Summarize::LANGUAGES for the supported list.
86
+ #
87
+ # == Returns:
88
+ # A string summary
89
+ #
78
90
  def summarize(options = {})
79
91
  dict_file, ratio = Summarize.parse_options(options)
80
92
  String.send(:summarize, self, dict_file, ratio)
@@ -84,6 +96,18 @@ end
84
96
 
85
97
  class File
86
98
 
99
+ # Summarizes the contents of a file
100
+ #
101
+ # == Options:
102
+ # ratio::
103
+ # A Fixnum from 0 to 100
104
+ #
105
+ # language::
106
+ # An ISO 639-1 language code. See Summarize::LANGUAGES for the supported list.
107
+ #
108
+ # == Returns:
109
+ # A string summary
110
+ #
87
111
  def summarize(options = {})
88
112
  self.read.summarize(options)
89
113
  end
data/summarize.gemspec CHANGED
@@ -5,17 +5,18 @@ Gem::Specification.new do |s|
5
5
  s.name = %q{summarize}
6
6
  s.summary = %q{Open Text Summarizer}
7
7
  s.description = %q{Ruby C Extension for Open Text Summarizer}
8
- s.homepage = %q{http://github.com/intridea}
8
+ s.homepage = %q{http://github.com/ssoper/summarize}
9
9
  s.version = Summarize::VERSION
10
10
  s.authors = ["Sean Soper"]
11
11
  s.email = %q{sean.soper@gmail.com}
12
12
 
13
- s.rubygems_version = %q{1.3.7}
14
- s.date = %q{2010-11-08}
13
+ s.rubygems_version = %q{1.3.7}
14
+ s.date = %q{2010-11-30}
15
+ s.rubyforge_project = "summarize"
15
16
 
16
17
  s.require_paths = ["lib"]
17
- s.extensions = ["ext/summarize/extconf.rb"]
18
- s.files = %x{git ls-files}.split("\n").reject {|file| file =~ /^(features|cucumber)/ }
18
+ s.extensions = ["ext/summarize/extconf.rb"]
19
+ s.files = %x{git ls-files}.split("\n").reject {|file| file =~ /^(features|cucumber)/ }
19
20
 
20
21
  s.add_dependency 'rake-compiler'
21
22
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: summarize
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 0
9
- - 0
10
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Sean Soper
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-11-08 00:00:00 -05:00
17
+ date: 2010-11-30 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -26,7 +25,6 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 3
30
28
  segments:
31
29
  - 0
32
30
  version: "0"
@@ -99,11 +97,10 @@ files:
99
97
  - ext/summarize/text.c
100
98
  - ext/summarize/wordlist.c
101
99
  - lib/summarize.rb
102
- - lib/summarize/summarize.bundle
103
100
  - sample_data/jupiter.txt
104
101
  - summarize.gemspec
105
102
  has_rdoc: true
106
- homepage: http://github.com/intridea
103
+ homepage: http://github.com/ssoper/summarize
107
104
  licenses: []
108
105
 
109
106
  post_install_message:
@@ -116,7 +113,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
113
  requirements:
117
114
  - - ">="
118
115
  - !ruby/object:Gem::Version
119
- hash: 3
120
116
  segments:
121
117
  - 0
122
118
  version: "0"
@@ -125,13 +121,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
121
  requirements:
126
122
  - - ">="
127
123
  - !ruby/object:Gem::Version
128
- hash: 3
129
124
  segments:
130
125
  - 0
131
126
  version: "0"
132
127
  requirements: []
133
128
 
134
- rubyforge_project:
129
+ rubyforge_project: summarize
135
130
  rubygems_version: 1.3.7
136
131
  signing_key:
137
132
  specification_version: 3
Binary file