mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-12 18:26:30 +03:00
Fix string interpolation in times
This commit is contained in:
parent
b9ba58ba5c
commit
6025cdb992
|
@ -279,14 +279,13 @@ for exc_data in [
|
|||
# Times
|
||||
|
||||
for h in range(1, 12 + 1):
|
||||
hour = str(h)
|
||||
for period in ["a.m.", "am"]:
|
||||
_exc[hour+period] = [
|
||||
{ORTH: hour},
|
||||
_exc["%d%s" % (h, period)] = [
|
||||
{ORTH: "%d" % h},
|
||||
{ORTH: period, LEMMA: "a.m."}]
|
||||
for period in ["p.m.", "pm"]:
|
||||
_exc[hour+period] = [
|
||||
{ORTH: hour},
|
||||
_exc["%d%s" % (h, period)] = [
|
||||
{ORTH: "%d" % h},
|
||||
{ORTH: period, LEMMA: "p.m."}]
|
||||
|
||||
|
||||
|
|
|
@ -61,14 +61,13 @@ _exc["12m."] = [
|
|||
|
||||
|
||||
for h in range(1, 12 + 1):
|
||||
hour = str(h)
|
||||
for period in ["a.m.", "am"]:
|
||||
_exc[hour+period] = [
|
||||
{ORTH: hour},
|
||||
_exc["%d%s" % (h, period)] = [
|
||||
{ORTH: "%d" % h},
|
||||
{ORTH: period, LEMMA: "a.m."}]
|
||||
for period in ["p.m.", "pm"]:
|
||||
_exc[hour+period] = [
|
||||
{ORTH: hour},
|
||||
_exc["%d%s" % (h, period)] = [
|
||||
{ORTH: "%d" % h},
|
||||
{ORTH: period, LEMMA: "p.m."}]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user