mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 09:57:26 +03:00 
			
		
		
		
	* Improve error message in bin/parser/train.py
This commit is contained in:
		
							parent
							
								
									910a6c805f
								
							
						
					
					
						commit
						d249e2f7f3
					
				| 
						 | 
					@ -141,7 +141,7 @@ def train(Language, gold_tuples, model_dir, n_iter=15, feat_set=u'basic',
 | 
				
			||||||
                nlp.tagger(tokens)
 | 
					                nlp.tagger(tokens)
 | 
				
			||||||
                gold = GoldParse(tokens, annot_tuples)
 | 
					                gold = GoldParse(tokens, annot_tuples)
 | 
				
			||||||
                if not gold.is_projective:
 | 
					                if not gold.is_projective:
 | 
				
			||||||
                    raise Exception("Non-projective sentence in training: %s" % annot_tuples)
 | 
					                    raise Exception("Non-projective sentence in training: %s" % annot_tuples[1])
 | 
				
			||||||
                loss += nlp.parser.train(tokens, gold)
 | 
					                loss += nlp.parser.train(tokens, gold)
 | 
				
			||||||
                nlp.entity.train(tokens, gold)
 | 
					                nlp.entity.train(tokens, gold)
 | 
				
			||||||
                nlp.tagger.train(tokens, gold.tags)
 | 
					                nlp.tagger.train(tokens, gold.tags)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user