mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	
		
			
				
	
	
	
		
			1.4 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			1.4 KiB
		
	
	
	
	
	
	
	
| title | teaser | tag | source | new | 
|---|---|---|---|---|
| Corpus | An annotated corpus | class | spacy/gold/corpus.py | 3 | 
This class manages annotated corpora and can read training and development
datasets in the DocBin (.spacy) format.
Corpus.__init__
Create a Corpus. The input data can be a file or a directory of files.
| Name | Type | Description | 
|---|---|---|
| train | str / Path | Training data ( .spacyfile or directory of.spacyfiles). | 
| dev | str / Path | Development data ( .spacyfile or directory of.spacyfiles). | 
| limit | int | Maximum number of examples returned. | 
| RETURNS | Corpus | The newly constructed object. |