mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Changed loading EN model
This commit is contained in:
		
							parent
							
								
									3765d84d57
								
							
						
					
					
						commit
						f0d3672e17
					
				| 
						 | 
					@ -2,16 +2,14 @@
 | 
				
			||||||
from __future__ import unicode_literals
 | 
					from __future__ import unicode_literals
 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from ..util import load_test_model
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.mark.models('en')
 | 
					@pytest.mark.models('en')
 | 
				
			||||||
def test_issue1959():
 | 
					def test_issue1959(EN):
 | 
				
			||||||
    texts = ['Apple is looking at buying U.K. startup for $1 billion.']
 | 
					    texts = ['Apple is looking at buying U.K. startup for $1 billion.']
 | 
				
			||||||
    nlp = load_test_model('en_core_web_sm')
 | 
					    # nlp = load_test_model('en_core_web_sm')
 | 
				
			||||||
    nlp.add_pipe(clean_component, name='cleaner', after='ner')
 | 
					    EN.add_pipe(clean_component, name='cleaner', after='ner')
 | 
				
			||||||
    doc = nlp(texts[0])
 | 
					    doc = EN(texts[0])
 | 
				
			||||||
    doc_pipe = [doc_pipe for doc_pipe in nlp.pipe(texts)]
 | 
					    doc_pipe = [doc_pipe for doc_pipe in EN.pipe(texts)]
 | 
				
			||||||
    assert doc == doc_pipe[0]
 | 
					    assert doc == doc_pipe[0]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user