mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Fix conllu2json converter to output all sentences (#4716)
Make sure that the last batch of sentences is output if n_sents > 1.
This commit is contained in:
		
							parent
							
								
									0c9640ced3
								
							
						
					
					
						commit
						9aab0a55e1
					
				| 
						 | 
				
			
			@ -34,6 +34,9 @@ def conllu2json(input_data, n_sents=10, use_morphology=False, lang=None, **_):
 | 
			
		|||
            doc = create_doc(sentences, i)
 | 
			
		||||
            docs.append(doc)
 | 
			
		||||
            sentences = []
 | 
			
		||||
    if sentences:
 | 
			
		||||
        doc = create_doc(sentences, i)
 | 
			
		||||
        docs.append(doc)
 | 
			
		||||
    return docs
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user