cools commited on
Commit
098ee83
·
1 Parent(s): 3a69446

Update TextProcessor.py

Browse files
Files changed (1) hide show
  1. TextProcessor.py +3 -3
TextProcessor.py CHANGED
@@ -70,8 +70,8 @@ def paragraphs(folderpath):
70
  if is_section_header or is_the_classic or is_start_blockquote or is_after_blockquote or is_after_disposition or is_disposition:
71
  paras.append(para)
72
  para = []
73
- print('\n')
74
- print(str([j, pg_inds[j]]) + ':\t' + str(is_the_classic) + '\t' + str(is_start_blockquote) + '\t' + str(is_after_blockquote)+ '\t' + str(is_after_disposition) + '\t' + str(is_section_header) + '\t' + line_text)
75
  para.append((pg_inds[j], line_inds[j], is_inblock, line_text))
76
 
77
  paras.append(para)
@@ -98,4 +98,4 @@ def process_file(folderpath):
98
  x1, y1, x2, y2, para_first_line, pg_ind = indent
99
  image = cv2.imread(folderpath + '/' + str(pg_ind) + '-processed.png')
100
  cv2.circle(image, (x1 - 15, int(0.5 * (y1 + y2))), radius=1, color=(240, 32, 160), thickness=2)
101
- cv2.imwrite(folderpath + '/' + str(pg_ind) + '-processed.png', image)
 
70
  if is_section_header or is_the_classic or is_start_blockquote or is_after_blockquote or is_after_disposition or is_disposition:
71
  paras.append(para)
72
  para = []
73
+ # print('\n')
74
+ # print(str([j, pg_inds[j]]) + ':\t' + str(is_the_classic) + '\t' + str(is_start_blockquote) + '\t' + str(is_after_blockquote)+ '\t' + str(is_after_disposition) + '\t' + str(is_section_header) + '\t' + line_text)
75
  para.append((pg_inds[j], line_inds[j], is_inblock, line_text))
76
 
77
  paras.append(para)
 
98
  x1, y1, x2, y2, para_first_line, pg_ind = indent
99
  image = cv2.imread(folderpath + '/' + str(pg_ind) + '-processed.png')
100
  cv2.circle(image, (x1 - 15, int(0.5 * (y1 + y2))), radius=1, color=(240, 32, 160), thickness=2)
101
+ cv2.imwrite(folderpath + '/' + str(pg_ind) + '-processed.png', image)