Class: String
Constant Summary
Constants included from Summarize
Summarize::LANGUAGES, Summarize::VERSION
Instance Method Summary collapse
-
#summarize(options = {}) ⇒ Object
Summarizes a string.
Methods included from Summarize
Instance Method Details
#summarize(options = {}) ⇒ Object
Summarizes a string
Options:
- ratio
-
A Fixnum from 0 to 100
- language
-
An ISO 639-1 language code. See Summarize::LANGUAGES for the supported list.
- dictionary
-
A path to a custom stemming XML file
- topics
-
A boolean indicating whether to return topics as well. Return value will be an array instead with content first and topics second. Default is false.
Returns:
A string summary OR an array of content and topics
98 99 100 101 |
# File 'lib/summarize.rb', line 98 def summarize( = {}) dict_file, ratio, topics = Summarize.() String.send(:summarize, self, dict_file, ratio, topics) end |