mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Auto-format code with black (#10857)
Co-authored-by: explosion-bot <explosion-bot@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									f6a4b80c0b
								
							
						
					
					
						commit
						6172af8158
					
				| 
						 | 
					@ -1076,12 +1076,23 @@ def test_no_gold_ents(patterns):
 | 
				
			||||||
    # this will run the pipeline on the examples and shouldn't crash
 | 
					    # this will run the pipeline on the examples and shouldn't crash
 | 
				
			||||||
    results = nlp.evaluate(train_examples)
 | 
					    results = nlp.evaluate(train_examples)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.mark.issue(9575)
 | 
					@pytest.mark.issue(9575)
 | 
				
			||||||
def test_tokenization_mismatch():
 | 
					def test_tokenization_mismatch():
 | 
				
			||||||
    nlp = English()
 | 
					    nlp = English()
 | 
				
			||||||
    # include a matching entity so that update isn't skipped
 | 
					    # include a matching entity so that update isn't skipped
 | 
				
			||||||
    doc1 = Doc(nlp.vocab, words=["Kirby", "123456"], spaces=[True, False], ents=["B-CHARACTER", "B-CARDINAL"])
 | 
					    doc1 = Doc(
 | 
				
			||||||
    doc2 = Doc(nlp.vocab, words=["Kirby", "123", "456"], spaces=[True, False, False], ents=["B-CHARACTER", "B-CARDINAL", "B-CARDINAL"])
 | 
					        nlp.vocab,
 | 
				
			||||||
 | 
					        words=["Kirby", "123456"],
 | 
				
			||||||
 | 
					        spaces=[True, False],
 | 
				
			||||||
 | 
					        ents=["B-CHARACTER", "B-CARDINAL"],
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					    doc2 = Doc(
 | 
				
			||||||
 | 
					        nlp.vocab,
 | 
				
			||||||
 | 
					        words=["Kirby", "123", "456"],
 | 
				
			||||||
 | 
					        spaces=[True, False, False],
 | 
				
			||||||
 | 
					        ents=["B-CHARACTER", "B-CARDINAL", "B-CARDINAL"],
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    eg = Example(doc1, doc2)
 | 
					    eg = Example(doc1, doc2)
 | 
				
			||||||
    train_examples = [eg]
 | 
					    train_examples = [eg]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user