mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	* Adding Support for Yoruba * test text * Updated test string. * Fixing encoding declaration. * Adding encoding to stop_words.py * Added contributor agreement and removed iranlowo. * Added removed test files and removed iranlowo to keep project bare. * Returned CONTRIBUTING.md to default state. * Added delted conftest entries * Tidy up and auto-format * Revert CONTRIBUTING.md Co-authored-by: Ines Montani <ines@ines.io>
		
			
				
	
	
		
			25 lines
		
	
	
		
			593 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			593 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # coding: utf8
 | |
| from __future__ import unicode_literals
 | |
| 
 | |
| from .stop_words import STOP_WORDS
 | |
| from .lex_attrs import LEX_ATTRS
 | |
| from ..tokenizer_exceptions import BASE_EXCEPTIONS
 | |
| from ...language import Language
 | |
| from ...attrs import LANG
 | |
| 
 | |
| 
 | |
| class YorubaDefaults(Language.Defaults):
 | |
|     lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
 | |
|     lex_attr_getters.update(LEX_ATTRS)
 | |
|     lex_attr_getters[LANG] = lambda text: "yo"
 | |
|     stop_words = STOP_WORDS
 | |
|     tokenizer_exceptions = BASE_EXCEPTIONS
 | |
| 
 | |
| 
 | |
| class Yoruba(Language):
 | |
|     lang = "yo"
 | |
|     Defaults = YorubaDefaults
 | |
| 
 | |
| 
 | |
| __all__ = ["Yoruba"]
 |