Package DateHandler :: Module _Date_lt :: Class DateParserLT
[frames] | no frames]

Class DateParserLT

source code


Instance Methods
 
init_strings(self)
This method compiles regular expression strings for matching dates.
source code

Inherited from _DateParser.DateParser: __init__, invert_year, match_bce, match_calendar, match_modifier, match_quality, match_range, match_span, parse, re_longest_first, set_date

Class Variables
  modifier_to_int = {u'apie': 3, u'po': 2, u'prieš': 1}
  calendar_to_int = {u'g': 0, u'grigaliaus': 0, u'h': 2, u'hebra...
  quality_to_int = {u'apskaičiuota': 2, u'apytikriai': 1}

Inherited from _DateParser.DateParser: bce, french_to_int, hebrew_to_int, islamic_to_int, modifier_after_to_int, month_to_int, persian_to_int

Method Details

init_strings(self)

source code 

This method compiles regular expression strings for matching dates.

Most of the re's in most languages can stay as is. span and range most likely will need to change. Whatever change is done, this method may be called first as DateParser.init_strings(self) so that the invariant expresions don't need to be repeteadly coded. All differences can be coded after DateParser.init_strings(self) call, that way they override stuff from this method. See DateParserRU() as an example.

Overrides: _DateParser.DateParser.init_strings
(inherited documentation)

Class Variable Details

calendar_to_int

Value:
{u'g': 0,
 u'grigaliaus': 0,
 u'h': 2,
 u'hebrajų': 2,
 u'i': 5,
 u'islamo': 5,
 u'j': 1,
 u'julijaus': 1,
...