Module: Pismo

Defined in:
lib/pismo.rb,
lib/pismo/reader.rb,
lib/pismo/version.rb,
lib/pismo/document.rb,
lib/pismo/reader/base.rb,
lib/pismo/reader/tree.rb,
lib/pismo/reader/cluster.rb,
lib/pismo/external_attributes.rb,
lib/pismo/internal_attributes.rb

Defined Under Namespace

Modules: ExternalAttributes, InternalAttributes, Reader Classes: Document, NFunctions

Constant Summary collapse

VERSION =
"0.7.4"

Class Method Summary collapse

Class Method Details

.[](url) ⇒ Object

Load a URL, as with Pismo, and caches the Pismo document (mostly useful for debugging use)



30
31
32
33
# File 'lib/pismo.rb', line 30

def self.[](url)
  @docs ||= {}
  @docs[url] ||= Pismo::Document.new(url)
end

.document(handle, options = {}) ⇒ Object

Sugar methods to make creating document objects nicer



24
25
26
# File 'lib/pismo.rb', line 24

def self.document(handle, options = {})
  Document.new(handle, options)
end

.stopwordsObject

Return stopword list



37
38
39
# File 'lib/pismo.rb', line 37

def self.stopwords
  @stopwords ||= File.read(File.dirname(__FILE__) + '/pismo/stopwords.txt').split rescue []
end