Class KR::CiffParser
In: scripts/ciff-parser.rb
Parent: Object

Quick and dirty parser for CIFF SGML.

Methods

Constants

IGNORE = [ "expireDate", "startDate", "classNumber"]   These fields should not be considered when evaluating the models results
AD_START_PAT = /.*<krad>/i   Patterns needed for parsing CIFF
AD_END_PAT = /<\/krad>.*/i
TEXT_START_PAT = /.*<krtext.*?>/i
TEXT_END_PAT = /<\/krtext>.*/i
ATTR_PAT = /.*<krattribute\s+name="(.*?)"\s+value="(.*?)".*?>.*/i

Public Instance methods

Parses the specifed file and returns an array of ads. If in eval mode, the extra fields will be stored for the purposes of evaluating the model.

[Validate]