mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-30 23:47:31 +03:00 
			
		
		
		
	* Fix matcher test
This commit is contained in:
		
							parent
							
								
									63e3d4e27f
								
							
						
					
					
						commit
						e89069dcae
					
				|  | @ -110,10 +110,7 @@ def test_overlap_prefix_reorder(EN): | |||
| def test_ner_interaction(EN): | ||||
|     EN.matcher.add('LAX_Airport', 'AIRPORT', {}, [[{ORTH: 'LAX'}]]) | ||||
|     EN.matcher.add('SFO_Airport', 'AIRPORT', {}, [[{ORTH: 'SFO'}]]) | ||||
|     doc = EN.tokenizer(u'get me a flight from SFO to LAX leaving 20 December and arriving on January 5th') | ||||
|     EN.tagger(doc) | ||||
|     EN.matcher(doc) | ||||
|     EN.entity(doc) | ||||
|     doc = EN(u'get me a flight from SFO to LAX leaving 20 December and arriving on January 5th') | ||||
| 
 | ||||
|     ents = [(ent.label_, ent.text) for ent in doc.ents] | ||||
|     assert ents[0] == ('AIRPORT', 'SFO') | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user