abstract class Cadmium::Summarizer::AbstractSummarizer

Direct Known Subclasses

Defined in:

cadmium/summarizer/summarizer.cr

Instance Method Summary

Instance Method Detail

def all_terms(text : String) : Array(String) #

[View source]
def normalize_ratio(terms_ratio : Hash(String, Float64), min_ratio = 0.001, max_ratio = 0.5) : Hash(String, Float64) #

[View source]
def normalized_terms_ratio(text : String, min_ratio = 0.001, max_ratio = 0.5) : Hash(String, Float64) #

[View source]
abstract def select_sentences(text : String, max_num_sentences : Int32) : Array(String) #

All extraction-based summarizers must implement the select_sentences method.


[View source]
def significant_terms(text : String) : Array(String) #

[View source]
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


[View source]
def terms_frequencies(terms : Array(String)) : Hash(String, Int32) #

[View source]
def terms_ratio(terms_frequencies : Hash(String, Int32), number_of_terms : Int32) : Hash(String, Float64) #

[View source]