Fix parsing for the span date in Ukrainian language, was conflict with b.c.e. string
This commit is contained in:
parent
8497e8c4b2
commit
c248767c1d
@ -102,10 +102,10 @@ class DateParserUK(DateParser):
|
|||||||
|
|
||||||
_span_1 = ['з', 'від']
|
_span_1 = ['з', 'від']
|
||||||
# b.c.e. pattern also have "до" so skip "до н."
|
# b.c.e. pattern also have "до" so skip "до н."
|
||||||
_span_2 = ['по', 'до?!\sн']
|
_span_2 = ['по', 'до(?!\s+н)']
|
||||||
_range_1 = ['між']
|
_range_1 = ['між']
|
||||||
_range_2 = ['і', 'та']
|
_range_2 = ['і', 'та']
|
||||||
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
self._span = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||||
('|'.join(_span_1), '|'.join(_span_2)),
|
('|'.join(_span_1), '|'.join(_span_2)),
|
||||||
re.IGNORECASE)
|
re.IGNORECASE)
|
||||||
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
self._range = re.compile("(%s)\s+(?P<start>.+)\s+(%s)\s+(?P<stop>.+)" %
|
||||||
|
Loading…
x
Reference in New Issue
Block a user