Vladt-Tempest commited on
Commit
0d8bb3c
·
1 Parent(s): 0afb73d

Refactoring: Eliminación de la función is_product_header()

Browse files
.gitignore CHANGED
@@ -15,3 +15,5 @@ invoices/
15
  # archivos de resultados
16
  data/
17
 
 
 
 
15
  # archivos de resultados
16
  data/
17
 
18
+ # archivos de prueba
19
+ test.py
__pycache__/commercial_invoice.cpython-310.pyc CHANGED
Binary files a/__pycache__/commercial_invoice.cpython-310.pyc and b/__pycache__/commercial_invoice.cpython-310.pyc differ
 
commercial_invoice.py CHANGED
@@ -20,13 +20,6 @@ logging.basicConfig(
20
  )
21
  logger = logging.getLogger(__name__)
22
 
23
- def is_product_header(text):
24
- """Detecta si es la línea de encabezado de productos"""
25
- header_keywords = ['boxes', 'pieces', 'product', 'tariff', 'bunches', 'stems', 'unit', 'price']
26
- if text:
27
- text_lower = text.lower()
28
- return all(keyword in text_lower for keyword in header_keywords)
29
- return False
30
 
31
  def is_horizontal_line(image_crop):
32
  """
 
20
  )
21
  logger = logging.getLogger(__name__)
22
 
 
 
 
 
 
 
 
23
 
24
  def is_horizontal_line(image_crop):
25
  """