Module: Pismo

Defined in:
lib/pismo.rb,
lib/pismo/reader.rb,
lib/pismo/version.rb,
lib/pismo/document.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.1"

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)



27
28
29
30
# File 'lib/pismo.rb', line 27

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

.document(handle, url = nil) ⇒ Object

Sugar methods to make creating document objects nicer



21
22
23
# File 'lib/pismo.rb', line 21

def self.document(handle, url = nil)
  Document.new(handle, url)
end

.stopwordsObject

Return stopword list



34
35
36
# File 'lib/pismo.rb', line 34

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