ahalamora commited on
Commit
a166497
·
1 Parent(s): 8b3c70a

Upload doc_process.py

Browse files
Files changed (1) hide show
  1. doc_process.py +1 -5
doc_process.py CHANGED
@@ -53,7 +53,6 @@ def doc_process(input_path, output_path):
53
  num_hnsx = 0
54
  num_other_lawyer = 0
55
 
56
- i = 0
57
  # 改管辖法院,并存到对应融担公司的目录中
58
  for qsz_file in qsz_file_list:
59
 
@@ -69,12 +68,9 @@ def doc_process(input_path, output_path):
69
  # 从表格中找到对应合同号的管辖法院
70
  court = df[df['合同号']==contract_id]['管辖法院'].tolist()[0]
71
 
72
- j = 0
73
  for p in doc.paragraphs:
74
  if '人民法院' in p.text:
75
- i += 1
76
- j += 1
77
- print(p.text, i, j)
78
  # 将正确的管辖法院更新到Docx中(加run设置字体)
79
  p.text = ''
80
  run = p.add_run(court)
 
53
  num_hnsx = 0
54
  num_other_lawyer = 0
55
 
 
56
  # 改管辖法院,并存到对应融担公司的目录中
57
  for qsz_file in qsz_file_list:
58
 
 
68
  # 从表格中找到对应合同号的管辖法院
69
  court = df[df['合同号']==contract_id]['管辖法院'].tolist()[0]
70
 
 
71
  for p in doc.paragraphs:
72
  if '人民法院' in p.text:
73
+
 
 
74
  # 将正确的管辖法院更新到Docx中(加run设置字体)
75
  p.text = ''
76
  run = p.add_run(court)