mirror of
				https://github.com/mikegerber/ocrd_calamari.git
				synced 2025-11-04 09:34:13 +01:00 
			
		
		
		
	📝 unwanted()
This commit is contained in:
		
							parent
							
								
									91cca1e1b8
								
							
						
					
					
						commit
						3149e1d9e0
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
					@ -106,6 +106,11 @@ class CalamariRecognize(Processor):
 | 
				
			||||||
                    # a strict hierarchy of lines > words > glyphs.
 | 
					                    # a strict hierarchy of lines > words > glyphs.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    def unwanted(c):
 | 
					                    def unwanted(c):
 | 
				
			||||||
 | 
					                        """
 | 
				
			||||||
 | 
					                        Define unwanted characters
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                        Words only containing these e.g. whitespace characters are not considered as words.
 | 
				
			||||||
 | 
					                        """
 | 
				
			||||||
                        return c == " "
 | 
					                        return c == " "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    word_no = 0
 | 
					                    word_no = 0
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue