abstract class Cadmium::Summarizer::AbstractSummarizer
- Cadmium::Summarizer::AbstractSummarizer
- Reference
- Object
Direct Known Subclasses
- Cadmium::Summarizer::KL
- Cadmium::Summarizer::Luhn
- Cadmium::Summarizer::SumBasic
- Cadmium::Summarizer::TextRank
Defined in:
cadmium/summarizer/summarizer.crInstance Method Summary
- #all_terms(text : String) : Array(String)
- #normalize_ratio(terms_ratio : Hash(String, Float64), min_ratio = 0.001, max_ratio = 0.5) : Hash(String, Float64)
- #normalized_terms_ratio(text : String, min_ratio = 0.001, max_ratio = 0.5) : Hash(String, Float64)
-
#select_sentences(text : String, max_num_sentences : Int32) : Array(String)
All extraction-based summarizers must implement the select_sentences method.
- #significant_terms(text : String) : Array(String)
-
#summarize(text : String, max_num_sentences = 5) : String
This summarize method should be common to all extraction-based summarizers as they all build a summary out of extracted and rated sentences
- #terms_frequencies(terms : Array(String)) : Hash(String, Int32)
- #terms_ratio(terms_frequencies : Hash(String, Int32), number_of_terms : Int32) : Hash(String, Float64)
Instance Method Detail
def normalize_ratio(terms_ratio : Hash(String, Float64), min_ratio = 0.001, max_ratio = 0.5) : Hash(String, Float64)
#
def normalized_terms_ratio(text : String, min_ratio = 0.001, max_ratio = 0.5) : Hash(String, Float64)
#
abstract
def select_sentences(text : String, max_num_sentences : Int32) : Array(String)
#
All extraction-based summarizers must implement the select_sentences method.
def summarize(text : String, max_num_sentences = 5) : String
#
This summarize method should be common to all extraction-based summarizers as they all build a summary out of extracted and rated sentences
def terms_ratio(terms_frequencies : Hash(String, Int32), number_of_terms : Int32) : Hash(String, Float64)
#