mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-11-04 01:48:04 +03:00 
			
		
		
		
	Simplify compat.fix_text
This commit is contained in:
		
							parent
							
								
									d2436dc17b
								
							
						
					
					
						commit
						401045433c
					
				| 
						 | 
					@ -23,6 +23,8 @@ is_windows = sys.platform.startswith('win')
 | 
				
			||||||
is_linux = sys.platform.startswith('linux')
 | 
					is_linux = sys.platform.startswith('linux')
 | 
				
			||||||
is_osx = sys.platform == 'darwin'
 | 
					is_osx = sys.platform == 'darwin'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					fix_text = ftfy.fix_text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if is_python2:
 | 
					if is_python2:
 | 
				
			||||||
    bytes_ = str
 | 
					    bytes_ = str
 | 
				
			||||||
| 
						 | 
					@ -39,9 +41,6 @@ elif is_python3:
 | 
				
			||||||
    json_dumps = lambda data: ujson.dumps(data, indent=2)
 | 
					    json_dumps = lambda data: ujson.dumps(data, indent=2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fix_text = lambda text: ftfy.fix_text(text)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def symlink_to(orig, dest):
 | 
					def symlink_to(orig, dest):
 | 
				
			||||||
    if is_python2 and is_windows:
 | 
					    if is_python2 and is_windows:
 | 
				
			||||||
        import subprocess
 | 
					        import subprocess
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user