mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	Set max_length to 100 for demo and evaluate
This commit is contained in:
		
							parent
							
								
									10e8dcdfdb
								
							
						
					
					
						commit
						47d7137c83
					
				| 
						 | 
					@ -80,10 +80,10 @@ def get_word_ids(docs, rnn_encode=False, tree_truncate=False, max_length=100, nr
 | 
				
			||||||
    return Xs
 | 
					    return Xs
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def create_similarity_pipeline(nlp):
 | 
					def create_similarity_pipeline(nlp, max_length=100):
 | 
				
			||||||
    return [
 | 
					    return [
 | 
				
			||||||
        nlp.tagger,
 | 
					        nlp.tagger,
 | 
				
			||||||
        nlp.entity,
 | 
					        nlp.entity,
 | 
				
			||||||
        nlp.parser,
 | 
					        nlp.parser,
 | 
				
			||||||
        KerasSimilarityShim.load(nlp.path / 'similarity', nlp, max_length=10)
 | 
					        KerasSimilarityShim.load(nlp.path / 'similarity', nlp, max_length)
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user