lib/epitome/corpus.rb in epitome-0.2.3 vs lib/epitome/corpus.rb in epitome-0.3.0
- old
+ new
@@ -56,10 +56,10 @@
results = power_method similarity_matrix, n, 0.85
# Ugly sleight of hand to return a text based on results
# <Array>Results => <Hash>Results => <String>ResultsText
h = Hash[@sentences.zip(results)]
- return h.sort_by {|k, v| v}.reverse.first(summary_length).to_h.keys
+ return h.sort_by {|k, v| v}.reverse.first(summary_length).to_h.keys.join(" ")
end
private
def clean(sentence_array)
# Clean the sentences a bit to avoid unnecessary operations