mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 16:07:41 +03:00 
			
		
		
		
	Implemented a foundational Scottish Gaelic (gd) language option with tokenizer_exceptions and stop_words files.
		
			
				
	
	
		
			19 lines
		
	
	
		
			383 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			383 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| from typing import Optional
 | |
| 
 | |
| from ...language import BaseDefaults, Language
 | |
| from .stop_words import STOP_WORDS
 | |
| from .tokenizer_exceptions import TOKENIZER_EXCEPTIONS
 | |
| 
 | |
| 
 | |
| class ScottishDefaults(BaseDefaults):
 | |
|     tokenizer_exceptions = TOKENIZER_EXCEPTIONS
 | |
|     stop_words = STOP_WORDS
 | |
| 
 | |
| 
 | |
| class Scottish(Language):
 | |
|     lang = "gd"
 | |
|     Defaults = ScottishDefaults
 | |
| 
 | |
| 
 | |
| __all__ = ["Scottish"]
 |