mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +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
 | 
					# Times
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for h in range(1, 12 + 1):
 | 
					for h in range(1, 12 + 1):
 | 
				
			||||||
    hour = str(h)
 | 
					 | 
				
			||||||
    for period in ["a.m.", "am"]:
 | 
					    for period in ["a.m.", "am"]:
 | 
				
			||||||
        _exc[hour+period] = [
 | 
					        _exc["%d%s" % (h, period)] = [
 | 
				
			||||||
            {ORTH: hour},
 | 
					            {ORTH: "%d" % h},
 | 
				
			||||||
            {ORTH: period, LEMMA: "a.m."}]
 | 
					            {ORTH: period, LEMMA: "a.m."}]
 | 
				
			||||||
    for period in ["p.m.", "pm"]:
 | 
					    for period in ["p.m.", "pm"]:
 | 
				
			||||||
        _exc[hour+period] = [
 | 
					        _exc["%d%s" % (h, period)] = [
 | 
				
			||||||
            {ORTH: hour},
 | 
					            {ORTH: "%d" % h},
 | 
				
			||||||
            {ORTH: period, LEMMA: "p.m."}]
 | 
					            {ORTH: period, LEMMA: "p.m."}]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -61,14 +61,13 @@ _exc["12m."] = [
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
for h in range(1, 12 + 1):
 | 
					for h in range(1, 12 + 1):
 | 
				
			||||||
    hour = str(h)
 | 
					 | 
				
			||||||
    for period in ["a.m.", "am"]:
 | 
					    for period in ["a.m.", "am"]:
 | 
				
			||||||
        _exc[hour+period] = [
 | 
					        _exc["%d%s" % (h, period)] = [
 | 
				
			||||||
            {ORTH: hour},
 | 
					            {ORTH: "%d" % h},
 | 
				
			||||||
            {ORTH: period, LEMMA: "a.m."}]
 | 
					            {ORTH: period, LEMMA: "a.m."}]
 | 
				
			||||||
    for period in ["p.m.", "pm"]:
 | 
					    for period in ["p.m.", "pm"]:
 | 
				
			||||||
        _exc[hour+period] = [
 | 
					        _exc["%d%s" % (h, period)] = [
 | 
				
			||||||
            {ORTH: hour},
 | 
					            {ORTH: "%d" % h},
 | 
				
			||||||
            {ORTH: period, LEMMA: "p.m."}]
 | 
					            {ORTH: period, LEMMA: "p.m."}]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user