Module: ODDB::AnalysisParse

Defined in:
ext/analysisparse/src/parser.rb,
ext/analysisparse/src/list_parser.rb,
ext/analysisparse/src/pagehandler.rb,
ext/analysisparse/src/analysisparse.rb,
ext/analysisparse/src/analysis_hpricot.rb,
ext/analysisparse/src/block_list_parser.rb,
ext/analysisparse/test/test_pagehandler.rb,
ext/analysisparse/test/test_list_parser.rb,
ext/analysisparse/src/simple_list_parser.rb,
ext/analysisparse/src/appendix_list_parser.rb,
ext/analysisparse/src/extended_list_parser.rb,
ext/analysisparse/src/antibody_list_parser.rb,
ext/analysisparse/test/test_appendix_parser.rb,
ext/analysisparse/src/anonymous_list_parser.rb,
ext/analysisparse/src/fragmented_page_handler.rb,
ext/analysisparse/test/test_block_list_parser.rb,
ext/analysisparse/test/test_simple_list_parser.rb,
ext/analysisparse/test/test_extended_list_parser.rb,
ext/analysisparse/test/test_antibody_list_parser.rb,
ext/analysisparse/test/test_anonymous_list_parser.rb,
ext/analysisparse/test/test_fragmented_page_handler.rb

Defined Under Namespace

Classes: AnalysisHpricot, AnonymousListParser, AntibodyListParser, AppendixListParser, BlockListParser, ExtendedListParser, FragmentedPageHandler, IndexFinder, IndexHandler, ListParser, PageHandler, Parser, SimpleListParser, TestAnonymousListParser, TestAntibodyListParser, TestAppendixListParser, TestBlockListParser, TestExtendedListParser, TestFragmentedPageHandler, TestIndexFinder, TestListParser, TestSimpleListParser

Class Method Summary (collapse)

Class Method Details

+ (Object) dacapo(&block)



20
21
22
23
# File 'ext/analysisparse/src/analysisparse.rb', line 20

def AnalysisParse.dacapo(&block)
  parser = AnalysisHpricot.new
  parser.dacapo_infos(&block)
end

+ (Object) parse_pdf(path)



10
11
12
13
14
15
16
17
18
19
# File 'ext/analysisparse/src/analysisparse.rb', line 10

def AnalysisParse.parse_pdf(path)
  pagenum = 0
  parser = Rpdf2txt::Parser.new(File.read(path), 'UTF-8')
  ph = ODDB::AnalysisParse::IndexFinder.new
  parser.page_tree.each { |page|
    ph = ph.analyze(page, pagenum)
    pagenum += 1
  }
  ph.positions
end