mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 16:07:41 +03:00 
			
		
		
		
	Add comment to like_num re: future work
This commit is contained in:
		
							parent
							
								
									adda08fe14
								
							
						
					
					
						commit
						15479b3bae
					
				|  | @ -19,6 +19,10 @@ miljardste biljoenste biljardste triljoenste triljardste | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def like_num(text): | def like_num(text): | ||||||
|  |     # This only does the most basic check for whether a token is a digit | ||||||
|  |     # or matches one of the number words. In order to handle numbers like | ||||||
|  |     # "drieëntwintig", more work is required. | ||||||
|  |     # See this discussion: https://github.com/explosion/spaCy/pull/1177 | ||||||
|     text = text.replace(',', '').replace('.', '') |     text = text.replace(',', '').replace('.', '') | ||||||
|     if text.isdigit(): |     if text.isdigit(): | ||||||
|         return True |         return True | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user