Class: Chomchom::Document
- Inherits:
-
Object
- Object
- Chomchom::Document
- Defined in:
- lib/chomchom.rb
Instance Method Summary collapse
- #all_topics ⇒ Object
- #author ⇒ Object
- #best_sentences(length = 400) ⇒ Object
- #center_of_gravity(length = 400) ⇒ Object
- #consume_duration ⇒ Object
- #first_mentions(length = 400) ⇒ Object
- #fulltext ⇒ Object
-
#initialize(html) ⇒ Document
constructor
A new instance of Document.
- #publish_date ⇒ Object
- #title ⇒ Object
- #topic_sentences(length = 400) ⇒ Object
Constructor Details
Instance Method Details
#all_topics ⇒ Object
37 38 39 |
# File 'lib/chomchom.rb', line 37 def all_topics @all_topics = Chomchom::Topic.new(@fulltext, @title, 1).singles end |
#author ⇒ Object
29 30 31 |
# File 'lib/chomchom.rb', line 29 def @extr. end |
#best_sentences(length = 400) ⇒ Object
53 54 55 |
# File 'lib/chomchom.rb', line 53 def best_sentences(length=400) Chomchom::Summary.best_sentences(@fulltext, @all_topics, length) end |
#center_of_gravity(length = 400) ⇒ Object
41 42 43 |
# File 'lib/chomchom.rb', line 41 def center_of_gravity(length=400) Chomchom::Summary.new.center_of_gravity(@fulltext, @all_topics, length) end |
#consume_duration ⇒ Object
33 34 35 |
# File 'lib/chomchom.rb', line 33 def consume_duration @extr.consume_duration end |
#first_mentions(length = 400) ⇒ Object
45 46 47 |
# File 'lib/chomchom.rb', line 45 def first_mentions(length=400) Chomchom::Summary.first_mentions(@fulltext, @all_topics, length) end |
#fulltext ⇒ Object
21 22 23 |
# File 'lib/chomchom.rb', line 21 def fulltext @fulltext end |
#publish_date ⇒ Object
25 26 27 |
# File 'lib/chomchom.rb', line 25 def publish_date @extr.publish_date end |
#title ⇒ Object
17 18 19 |
# File 'lib/chomchom.rb', line 17 def title @title end |
#topic_sentences(length = 400) ⇒ Object
49 50 51 |
# File 'lib/chomchom.rb', line 49 def topic_sentences(length=400) Chomchom::Summary.topic_sentences(@fulltext, @all_topics, length) end |