class RSemantic::Document
Attributes
attributes[R]
corpora[R]
text[R]
Public Class Methods
new(text, attributes = {})
click to toggle source
# File lib/rsemantic/document.rb, line 6 def initialize(text, attributes = {}) if text.respond_to?(:read) @text = text.read else @text = text end @attributes = attributes @corpora = [] end
Public Instance Methods
[](key)
click to toggle source
# File lib/rsemantic/document.rb, line 21 def [](key) @attributes[key] end
keywords(num = 5)
click to toggle source
# File lib/rsemantic/document.rb, line 35 def keywords(num = 5) end
to_s()
click to toggle source
# File lib/rsemantic/document.rb, line 17 def to_s "#<%s @attributes=%s>" % [self.class.name, @attributes.inspect] end