devve1 commited on
Commit
e4f1905
1 Parent(s): f8c1dce

Update ppt_chunker.py

Browse files
Files changed (1) hide show
  1. ppt_chunker.py +6 -5
ppt_chunker.py CHANGED
@@ -87,8 +87,9 @@ def ppt_chunk(file_like, nlp):
87
  chunk = process_chunk(chunk, nlp)
88
 
89
  tables = []
90
-
91
- while i < len(chunks):
 
92
  new_sub_chunks = []
93
  only_tables = True
94
 
@@ -101,10 +102,10 @@ def ppt_chunk(file_like, nlp):
101
  only_tables = False
102
 
103
  if only_tables:
104
- del chunks[i]
105
  else:
106
- chunks[i] = [chunk[0], new_sub_chunks]
107
- i += 1
108
 
109
  er = time.time()
110
  fr = er - s
 
87
  chunk = process_chunk(chunk, nlp)
88
 
89
  tables = []
90
+ j = 0
91
+
92
+ while j < len(chunks):
93
  new_sub_chunks = []
94
  only_tables = True
95
 
 
102
  only_tables = False
103
 
104
  if only_tables:
105
+ del chunks[j]
106
  else:
107
+ chunks[j] = [chunk[0], new_sub_chunks]
108
+ j += 1
109
 
110
  er = time.time()
111
  fr = er - s