Parcourir la source

将题型限制相关改为99题

莺声燕语 il y a 1 an
Parent
commit
5da002eeb4

+ 165 - 214
.idea/workspace.xml

@@ -4,10 +4,14 @@
     <list default="true" id="264b59ce-0122-420f-a5d3-3ffa8b015ccb" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/configs.py" beforeDir="false" afterPath="$PROJECT_DIR$/configs.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/server.py" beforeDir="false" afterPath="$PROJECT_DIR$/server.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/structure/ans_structure.py" beforeDir="false" afterPath="$PROJECT_DIR$/structure/ans_structure.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/structure/danti_structure.py" beforeDir="false" afterPath="$PROJECT_DIR$/structure/danti_structure.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/structure/stems_structure.py" beforeDir="false" afterPath="$PROJECT_DIR$/structure/stems_structure.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/structure/three_parse_structure.py" beforeDir="false" afterPath="$PROJECT_DIR$/structure/three_parse_structure.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/utils/field_eq2latex.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/field_eq2latex.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/utils/image_convert.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/image_convert.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/utils/insert_keywords.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/insert_keywords.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/utils/ruku_opera.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/ruku_opera.py" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/utils/topic_no.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/topic_no.py" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/utils/washutil.py" beforeDir="false" afterPath="$PROJECT_DIR$/utils/washutil.py" afterDir="false" />
     </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -35,82 +39,24 @@
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
       <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/utils/ruku_opera.py">
+        <entry file="file://$PROJECT_DIR$/structure/structure_main.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="251">
-              <caret line="195" column="52" lean-forward="true" selection-start-line="195" selection-start-column="52" selection-end-line="195" selection-end-column="52" />
+            <state relative-caret-position="-1639">
+              <caret line="175" column="17" lean-forward="true" selection-start-line="175" selection-start-column="17" selection-end-line="175" selection-end-column="17" />
               <folding>
-                <element signature="e#24#46#0" expanded="true" />
-                <element signature="e#19847#19883#0" />
-                <element signature="e#22125#22147#0" />
+                <element signature="e#47#72#0" expanded="true" />
+                <element signature="e#4704#4745#0" />
+                <element signature="e#6213#6246#0" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/utils/image_convert.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="145">
-              <caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
-              <folding>
-                <element signature="e#0#36#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/utils/diffi_label.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="204">
-              <caret line="9" column="4" selection-start-line="9" selection-start-column="4" selection-end-line="9" selection-end-column="4" />
-              <folding>
-                <element signature="e#0#11#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/ceshi.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="7820">
-              <caret line="234" selection-start-line="234" selection-end-line="234" />
-              <folding>
-                <element signature="e#47#96#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/utils/washutil.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="72">
-              <caret line="18" column="38" lean-forward="true" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
-              <folding>
-                <element signature="e#689#1758#0" />
-                <element signature="e#1800#4219#0" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/utils/field_eq2latex.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="69">
-              <caret line="294" column="23" lean-forward="true" selection-start-line="294" selection-start-column="23" selection-end-line="294" selection-end-column="23" />
-            </state>
-          </provider>
-        </entry>
-      </file>
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/configs.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="3672">
-              <caret line="112" column="4" selection-start-line="112" selection-start-column="4" selection-end-line="112" selection-end-column="4" />
+            <state relative-caret-position="5474">
+              <caret line="165" column="5" selection-start-line="165" selection-start-column="5" selection-end-line="165" selection-end-column="5" />
               <folding>
                 <element signature="e#46#60#0" expanded="true" />
               </folding>
@@ -121,8 +67,8 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/server.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="287">
-              <caret line="210" column="45" lean-forward="true" selection-start-line="210" selection-start-column="45" selection-end-line="210" selection-end-column="66" />
+            <state relative-caret-position="210">
+              <caret line="78" column="65" lean-forward="true" selection-start-line="78" selection-start-column="65" selection-end-line="78" selection-end-column="65" />
               <folding>
                 <element signature="e#105#118#0" expanded="true" />
               </folding>
@@ -130,18 +76,6 @@
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/structure/danti_structure.py">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="2992">
-              <caret line="95" column="16" selection-start-line="95" selection-start-column="16" selection-end-line="95" selection-end-column="16" />
-              <folding>
-                <element signature="e#64#73#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
     </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
@@ -153,9 +87,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>table</find>
-      <find>见解析</find>
-      <find>br</find>
       <find>入库失败</find>
       <find>answer_type</find>
       <find>subject</find>
@@ -179,10 +110,13 @@
       <find>callback_user</find>
       <find>print</find>
       <find>auto_mark_result</find>
-      <find>get_kps_auto</find>
       <find>svg2png</find>
       <find>urllib</find>
       <find>&lt;img src</find>
+      <find>判断</find>
+      <find>Hmath_kps</find>
+      <find>get_kps_auto</find>
+      <find>1-4</find>
     </findStrings>
     <replaceStrings>
       <replace>cur_type</replace>
@@ -225,7 +159,6 @@
         <option value="$PROJECT_DIR$/structure/structure_mian.py" />
         <option value="$PROJECT_DIR$/utils/photo_upload_qcloud_test.py" />
         <option value="$PROJECT_DIR$/utils/ruku_upload_img.py" />
-        <option value="$PROJECT_DIR$/utils/insert_keywords.py" />
         <option value="$PROJECT_DIR$/utils/item_resplit.py" />
         <option value="$PROJECT_DIR$/ans_structrue_old.py" />
         <option value="$PROJECT_DIR$/structure/ans_structure1.py" />
@@ -234,7 +167,6 @@
         <option value="$PROJECT_DIR$/utils/img2latex.py" />
         <option value="$PROJECT_DIR$/server3.py" />
         <option value="$PROJECT_DIR$/utils/diffi_label.py" />
-        <option value="$PROJECT_DIR$/utils/topic_no.py" />
         <option value="$PROJECT_DIR$/ruku_test.py" />
         <option value="$PROJECT_DIR$/app_test.py" />
         <option value="$PROJECT_DIR$/utils/equation_extract.py" />
@@ -247,24 +179,26 @@
         <option value="$PROJECT_DIR$/struct_items1.pickle" />
         <option value="$PROJECT_DIR$/utils/ruku_opera2.py" />
         <option value="$PROJECT_DIR$/utils/ruku_test.py" />
-        <option value="$PROJECT_DIR$/structure/stems_structure.py" />
-        <option value="$PROJECT_DIR$/structure/final_structure.py" />
-        <option value="$PROJECT_DIR$/structure/three_parse_structure.py" />
         <option value="$PROJECT_DIR$/utils/pic_pos_judge.py" />
-        <option value="$PROJECT_DIR$/structure/ans_structure.py" />
         <option value="$PROJECT_DIR$/utils/item_type_line.py" />
         <option value="$PROJECT_DIR$/structure/option.py" />
         <option value="$PROJECT_DIR$/structure/dati2slave.py" />
-        <option value="$PROJECT_DIR$/structure/danti_structure.py" />
         <option value="$PROJECT_DIR$/structure/structure_main.py" />
         <option value="$PROJECT_DIR$/utils/html_again_parse.py" />
-        <option value="$PROJECT_DIR$/utils/washutil.py" />
-        <option value="$PROJECT_DIR$/configs.py" />
-        <option value="$PROJECT_DIR$/utils/field_eq2latex.py" />
         <option value="$PROJECT_DIR$/server.py" />
         <option value="$PROJECT_DIR$/ceshi.py" />
-        <option value="$PROJECT_DIR$/utils/ruku_opera.py" />
         <option value="$PROJECT_DIR$/utils/image_convert.py" />
+        <option value="$PROJECT_DIR$/structure/final_structure.py" />
+        <option value="$PROJECT_DIR$/utils/field_eq2latex.py" />
+        <option value="$PROJECT_DIR$/utils/ruku_opera.py" />
+        <option value="$PROJECT_DIR$/configs.py" />
+        <option value="$PROJECT_DIR$/utils/washutil.py" />
+        <option value="$PROJECT_DIR$/structure/danti_structure.py" />
+        <option value="$PROJECT_DIR$/utils/insert_keywords.py" />
+        <option value="$PROJECT_DIR$/utils/topic_no.py" />
+        <option value="$PROJECT_DIR$/structure/ans_structure.py" />
+        <option value="$PROJECT_DIR$/structure/three_parse_structure.py" />
+        <option value="$PROJECT_DIR$/structure/stems_structure.py" />
       </list>
     </option>
   </component>
@@ -275,10 +209,10 @@
     <sorting>DEFINITION_ORDER</sorting>
   </component>
   <component name="ProjectFrameBounds" extendedState="6">
-    <option name="x" value="-8" />
-    <option name="y" value="-8" />
-    <option name="width" value="1936" />
-    <option name="height" value="1096" />
+    <option name="x" value="-36" />
+    <option name="y" value="130" />
+    <option name="width" value="1354" />
+    <option name="height" value="812" />
   </component>
   <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
   <component name="ProjectView">
@@ -299,11 +233,6 @@
               <item name="new_tiku_structure_v3_sci" type="462c0819:PsiDirectoryNode" />
               <item name="logs" type="462c0819:PsiDirectoryNode" />
             </path>
-            <path>
-              <item name="new_tiku_structure_v3_sci" type="b2602c69:ProjectViewProjectNode" />
-              <item name="new_tiku_structure_v3_sci" type="462c0819:PsiDirectoryNode" />
-              <item name="structure" type="462c0819:PsiDirectoryNode" />
-            </path>
             <path>
               <item name="new_tiku_structure_v3_sci" type="b2602c69:ProjectViewProjectNode" />
               <item name="new_tiku_structure_v3_sci" type="462c0819:PsiDirectoryNode" />
@@ -346,7 +275,7 @@
       </list>
     </option>
   </component>
-  <component name="RunManager" selected="Python.image_convert">
+  <component name="RunManager" selected="Python.server">
     <configuration name="ceshi" type="PythonConfigurationType" factoryName="Python" temporary="true">
       <module name="parse_online58" />
       <option name="INTERPRETER_OPTIONS" value="" />
@@ -477,9 +406,9 @@
     <recent_temporary>
       <list>
         <item itemvalue="Python.server" />
+        <item itemvalue="Python.field_eq2latex" />
         <item itemvalue="Python.image_convert" />
         <item itemvalue="Python.ceshi" />
-        <item itemvalue="Python.field_eq2latex" />
         <item itemvalue="Python.structure_main" />
       </list>
     </recent_temporary>
@@ -775,7 +704,21 @@
       <option name="project" value="LOCAL" />
       <updated>1662636471871</updated>
     </task>
-    <option name="localTasksCounter" value="41" />
+    <task id="LOCAL-00041" summary="保存入库时调大svg2png的分辨率并对分式的latex调大尺寸">
+      <created>1668074968557</created>
+      <option name="number" value="00041" />
+      <option name="presentableId" value="LOCAL-00041" />
+      <option name="project" value="LOCAL" />
+      <updated>1668074968557</updated>
+    </task>
+    <task id="LOCAL-00042" summary="保存入库时重新调整svg2png的图片尺寸&#10;选择题题干去掉换行">
+      <created>1669811072980</created>
+      <option name="number" value="00042" />
+      <option name="presentableId" value="LOCAL-00042" />
+      <option name="project" value="LOCAL" />
+      <updated>1669811072980</updated>
+    </task>
+    <option name="localTasksCounter" value="43" />
     <servers />
   </component>
   <component name="TodoView">
@@ -791,12 +734,12 @@
     <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.4985591" visible="true" weight="0.21360256" />
+      <window_info content_ui="combo" id="Project" order="0" sideWeight="0.4985591" visible="true" weight="0.17800212" />
       <window_info id="Structure" order="1" sideWeight="0.50144094" side_tool="true" weight="0.15773447" />
       <window_info id="Favorites" order="2" sideWeight="0.50144094" side_tool="true" weight="0.15773447" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" />
-      <window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.499391" visible="true" weight="0.35714287" />
+      <window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.499391" visible="true" weight="0.25738916" />
       <window_info anchor="bottom" id="Terminal" order="3" weight="0.13423645" />
       <window_info anchor="bottom" id="Debug" order="4" sideWeight="0.499391" weight="0.34852216" />
       <window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
@@ -841,8 +784,6 @@
     <option name="version" value="1" />
   </component>
   <component name="VcsManagerConfiguration">
-    <MESSAGE value="css清洗中保留下划线特征、日志格式更新" />
-    <MESSAGE value="htmlwash中保留“&lt;td rowspan”标签" />
     <MESSAGE value="导致渲染问题的公式规范化处理及&amp;amp;符号处理" />
     <MESSAGE value="渲染问题公式规范化处理及&amp;amp;符号处理" />
     <MESSAGE value="更新" />
@@ -866,14 +807,16 @@
     <MESSAGE value="option_label_correct中修改con_list2的bug" />
     <MESSAGE value="判断题更新" />
     <MESSAGE value="保存入库回调带上请求头" />
-    <option name="LAST_COMMIT_MESSAGE" value="保存入库回调带上请求头" />
+    <MESSAGE value="保存入库时调大svg2png的分辨率并对分式的latex调大尺寸" />
+    <MESSAGE value="保存入库时重新调整svg2png的图片尺寸&#10;选择题题干去掉换行" />
+    <option name="LAST_COMMIT_MESSAGE" value="保存入库时重新调整svg2png的图片尺寸&#10;选择题题干去掉换行" />
   </component>
   <component name="XDebuggerManager">
     <breakpoint-manager>
       <breakpoints>
         <line-breakpoint suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/utils/field_eq2latex.py</url>
-          <line>365</line>
+          <line>375</line>
           <option name="timeStamp" value="118" />
         </line-breakpoint>
         <line-breakpoint suspend="THREAD" type="python-line">
@@ -968,7 +911,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
           <url>file://$PROJECT_DIR$/structure/final_structure.py</url>
-          <line>85</line>
+          <line>86</line>
           <option name="timeStamp" value="224" />
         </line-breakpoint>
         <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
@@ -996,6 +939,11 @@
           <line>82</line>
           <option name="timeStamp" value="240" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
+          <url>file://$PROJECT_DIR$/utils/ruku_opera.py</url>
+          <line>603</line>
+          <option name="timeStamp" value="241" />
+        </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
     <watches-manager>
@@ -1019,11 +967,6 @@
     </expressions>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/res_folder/2021_04_02_16_05_45.html">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-2040" />
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/res_folder/10-28.json">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
@@ -1187,20 +1130,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/topic_no.py">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-328">
-          <caret line="24" column="4" selection-start-line="24" selection-start-column="4" selection-end-line="24" selection-end-column="4" />
-          <folding>
-            <element signature="e#46#55#0" expanded="true" />
-            <marker date="1638177811280" expanded="true" signature="2599:2604" ph="..." />
-            <marker date="1638177811280" expanded="true" signature="2599:3381" ph="..." />
-            <marker date="1638177811280" expanded="true" signature="7475:9017" ph="..." />
-            <marker date="1638177811280" expanded="true" signature="9075:9080" ph="..." />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/utils/item_resplit.py">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-1243">
@@ -1251,193 +1180,215 @@
     <entry file="file://$PROJECT_DIR$/logs/parse_log.log">
       <provider selected="true" editor-type-id="text-editor" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/structure/option.py">
+    <entry file="file://$PROJECT_DIR$/utils/pic_pos_judge.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="169">
-          <caret line="26" column="97" lean-forward="true" selection-start-line="26" selection-start-column="97" selection-end-line="26" selection-end-column="97" />
+        <state relative-caret-position="2176">
+          <caret line="64" selection-start-line="64" selection-end-line="64" />
           <folding>
-            <element signature="e#46#59#0" expanded="true" />
+            <marker date="1655779633177" expanded="true" signature="95:100" ph="..." />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/structure/three_parse_structure.py">
+    <entry file="file://$PROJECT_DIR$/utils/html_again_parse.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="10302">
-          <caret line="312" column="28" selection-start-line="312" selection-start-column="28" selection-end-line="312" selection-end-column="28" />
+        <state relative-caret-position="5338">
+          <caret line="160" selection-start-line="160" selection-end-line="160" />
           <folding>
-            <element signature="e#241#278#0" expanded="true" />
+            <element signature="e#24#33#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/pic_pos_judge.py">
+    <entry file="file://$PROJECT_DIR$/structure/dati2slave.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2176">
-          <caret line="64" selection-start-line="64" selection-end-line="64" />
+        <state relative-caret-position="102">
+          <caret line="3" column="9" selection-start-line="3" selection-start-column="9" selection-end-line="3" selection-end-column="9" />
           <folding>
-            <marker date="1655779633177" expanded="true" signature="95:100" ph="..." />
+            <element signature="e#5987#6021#0" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/structure/stems_structure.py">
+    <entry file="file://$PROJECT_DIR$/utils/ruku_test.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1190">
-          <caret line="37" column="59" selection-start-line="37" selection-start-column="59" selection-end-line="37" selection-end-column="59" />
+        <state relative-caret-position="27540">
+          <caret line="859" column="41" selection-start-line="859" selection-start-column="41" selection-end-line="859" selection-end-column="41" />
           <folding>
-            <element signature="e#3569#3576#0" />
+            <element signature="e#24#46#0" expanded="true" />
+            <element signature="e#1334#4074#0" />
+            <element signature="e#2169#2246#0" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/html_again_parse.py">
+    <entry file="file://C:/Anaconda3/Lib/site-packages/wand/image.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="5338">
-          <caret line="160" selection-start-line="160" selection-end-line="160" />
+        <state relative-caret-position="805">
+          <caret line="9050" column="8" selection-start-line="9050" selection-start-column="8" selection-end-line="9050" selection-end-column="8" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/utils/diffi_label.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="204">
+          <caret line="9" column="4" selection-start-line="9" selection-start-column="4" selection-end-line="9" selection-end-column="4" />
           <folding>
-            <element signature="e#24#33#0" expanded="true" />
+            <element signature="e#0#11#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/structure/structure_main.py">
+    <entry file="file://$PROJECT_DIR$/utils/image_convert.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="4114">
-          <caret line="142" column="28" selection-start-line="142" selection-start-column="28" selection-end-line="142" selection-end-column="28" />
+        <state relative-caret-position="224">
+          <caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
           <folding>
-            <element signature="e#47#72#0" expanded="true" />
-            <element signature="e#4704#4745#0" />
-            <element signature="e#6213#6246#0" />
+            <element signature="e#0#36#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/structure/dati2slave.py">
+    <entry file="file://$PROJECT_DIR$/utils/ruku_opera.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="102">
-          <caret line="3" column="9" selection-start-line="3" selection-start-column="9" selection-end-line="3" selection-end-column="9" />
+        <state relative-caret-position="20672">
+          <caret line="621" column="64" selection-start-line="621" selection-start-column="64" selection-end-line="621" selection-end-column="64" />
           <folding>
-            <element signature="e#5987#6021#0" />
+            <element signature="e#24#46#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/structure/final_structure.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2788">
-          <caret line="85" selection-start-line="85" selection-end-line="85" />
+        <state relative-caret-position="2312">
+          <caret line="71" column="36" selection-start-line="71" selection-start-column="36" selection-end-line="71" selection-end-column="36" />
           <folding>
             <element signature="e#11#20#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/ruku_test.py">
+    <entry file="file://$PROJECT_DIR$/ceshi.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="27540">
-          <caret line="859" column="41" selection-start-line="859" selection-start-column="41" selection-end-line="859" selection-end-column="41" />
+        <state relative-caret-position="7820">
+          <caret line="234" selection-start-line="234" selection-end-line="234" />
           <folding>
-            <element signature="e#24#46#0" expanded="true" />
-            <element signature="e#1334#4074#0" />
-            <element signature="e#2169#2246#0" />
+            <element signature="e#47#96#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://C:/Anaconda3/Lib/site-packages/wand/image.py">
+    <entry file="file://$PROJECT_DIR$/structure/option.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="805">
-          <caret line="9050" column="8" selection-start-line="9050" selection-start-column="8" selection-end-line="9050" selection-end-column="8" />
+        <state relative-caret-position="2788">
+          <caret line="86" column="26" selection-start-line="86" selection-start-column="26" selection-end-line="86" selection-end-column="26" />
+          <folding>
+            <element signature="e#46#59#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/diffi_label.py">
+    <entry file="file://$PROJECT_DIR$/configs.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="204">
-          <caret line="9" column="4" selection-start-line="9" selection-start-column="4" selection-end-line="9" selection-end-column="4" />
+        <state relative-caret-position="5474">
+          <caret line="165" column="5" selection-start-line="165" selection-start-column="5" selection-end-line="165" selection-end-column="5" />
           <folding>
-            <element signature="e#0#11#0" expanded="true" />
+            <element signature="e#46#60#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/ceshi.py">
+    <entry file="file://$PROJECT_DIR$/server.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="7820">
-          <caret line="234" selection-start-line="234" selection-end-line="234" />
+        <state relative-caret-position="210">
+          <caret line="78" column="65" lean-forward="true" selection-start-line="78" selection-start-column="65" selection-end-line="78" selection-end-column="65" />
           <folding>
-            <element signature="e#47#96#0" expanded="true" />
+            <element signature="e#105#118#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/configs.py">
+    <entry file="file://$PROJECT_DIR$/utils/washutil.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="3672">
-          <caret line="112" column="4" selection-start-line="112" selection-start-column="4" selection-end-line="112" selection-end-column="4" />
+        <state relative-caret-position="-14848">
+          <caret line="301" column="54" lean-forward="true" selection-start-line="301" selection-start-column="54" selection-end-line="301" selection-end-column="54" />
           <folding>
-            <element signature="e#46#60#0" expanded="true" />
+            <element signature="e#138#153#0" expanded="true" />
+            <element signature="e#1800#4219#0" />
+            <element signature="e#36470#36532#0" />
+            <element signature="e#36922#36996#0" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/structure/danti_structure.py">
+    <entry file="file://$PROJECT_DIR$/utils/insert_keywords.py">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-2563">
+          <caret line="29" column="58" selection-start-line="29" selection-start-column="58" selection-end-line="29" selection-end-column="58" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/structure/stems_structure.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2992">
-          <caret line="95" column="16" selection-start-line="95" selection-start-column="16" selection-end-line="95" selection-end-column="16" />
+        <state relative-caret-position="468">
+          <caret line="20" column="11" selection-start-line="20" selection-start-column="11" selection-end-line="20" selection-end-column="11" />
           <folding>
-            <element signature="e#64#73#0" expanded="true" />
+            <element signature="e#3569#3576#0" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/server.py">
+    <entry file="file://$PROJECT_DIR$/structure/three_parse_structure.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="287">
-          <caret line="210" column="45" lean-forward="true" selection-start-line="210" selection-start-column="45" selection-end-line="210" selection-end-column="66" />
+        <state relative-caret-position="3432">
+          <caret line="132" column="4" selection-start-line="132" selection-start-column="4" selection-end-line="132" selection-end-column="4" />
           <folding>
-            <element signature="e#105#118#0" expanded="true" />
+            <element signature="e#241#278#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/field_eq2latex.py">
+    <entry file="file://$PROJECT_DIR$/utils/topic_no.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="69">
-          <caret line="294" column="23" lean-forward="true" selection-start-line="294" selection-start-column="23" selection-end-line="294" selection-end-column="23" />
+        <state relative-caret-position="-7412">
+          <caret line="84" lean-forward="true" selection-start-line="84" selection-end-line="84" />
+          <folding>
+            <element signature="e#46#55#0" expanded="true" />
+            <element signature="e#9944#9957#0" />
+            <element signature="e#11002#11066#0" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/washutil.py">
+    <entry file="file://$PROJECT_DIR$/utils/field_eq2latex.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="72">
-          <caret line="18" column="38" lean-forward="true" selection-start-line="18" selection-start-column="38" selection-end-line="18" selection-end-column="38" />
+        <state relative-caret-position="9856">
+          <caret line="356" column="9" selection-start-line="356" selection-start-column="9" selection-end-line="356" selection-end-column="9" />
           <folding>
-            <element signature="e#689#1758#0" />
-            <element signature="e#1800#4219#0" />
+            <element signature="e#16205#16289#0" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/image_convert.py">
+    <entry file="file://$PROJECT_DIR$/structure/danti_structure.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="145">
-          <caret line="18" column="4" selection-start-line="18" selection-start-column="4" selection-end-line="18" selection-end-column="4" />
+        <state relative-caret-position="-2201">
+          <caret line="40" column="50" selection-start-line="40" selection-start-column="50" selection-end-line="40" selection-end-column="50" />
           <folding>
-            <element signature="e#0#36#0" expanded="true" />
+            <element signature="e#64#73#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/utils/ruku_opera.py">
+    <entry file="file://$PROJECT_DIR$/structure/structure_main.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="251">
-          <caret line="195" column="52" lean-forward="true" selection-start-line="195" selection-start-column="52" selection-end-line="195" selection-end-column="52" />
+        <state relative-caret-position="-1639">
+          <caret line="175" column="17" lean-forward="true" selection-start-line="175" selection-start-column="17" selection-end-line="175" selection-end-column="17" />
           <folding>
-            <element signature="e#24#46#0" expanded="true" />
-            <element signature="e#19847#19883#0" />
-            <element signature="e#22125#22147#0" />
+            <element signature="e#47#72#0" expanded="true" />
+            <element signature="e#4704#4745#0" />
+            <element signature="e#6213#6246#0" />
           </folding>
         </state>
       </provider>

+ 1 - 1
configs.py

@@ -110,7 +110,7 @@ class ProductionCfg:  # production
     old_img_ip = "http://82.156.255.225:11086/ser_static"
     mathpix_ip = "http://10.19.1.11:7080/segment/formula/"
     kps_phy_ip = "http:/49.232.72.198:11088/phy_mark_and_connect"
-    kps_Hmath_ip = ""
+    kps_Hmath_ip = "http://172.16.2.5:13356/auto_labels"
     repeat_ip = "http://10.19.1.18:8866/api/repeat/subject"
     callback_url_taskcheck = "http://api.tk.zhixinhuixue.com/v1/interior-api/record"
 

+ 21 - 21
structure/ans_structure.py

@@ -53,9 +53,9 @@ def anss_structure_with_type(item_res, ans_str, all_type, all_type2,item_type_nu
                 one_type_ans = []
                 one_type_no = []
                 # 规范化
-                one_type = re.sub("\n\s*(\${*?)([1-4][0-9]|[1-9])\s*([..、、])(.+?)", r"\n\2\3\1\4", one_type)
-                one_type = re.sub("\$(([1-4][0-9]|[1-9])\s*[..、、].+?)", r"$ \1", one_type)
-                one_type = re.sub("(\${*?)([1-4][0-9]|[1-9])\s*([..、、])\s*(?!\d)", r" \2\3\1", one_type)
+                one_type = re.sub("\n\s*(\${*?)([1-9][0-9]|[1-9])\s*([..、、])(.+?)", r"\n\2\3\1\4", one_type)
+                one_type = re.sub("\$(([1-9][0-9]|[1-9])\s*[..、、].+?)", r"$ \1", one_type)
+                one_type = re.sub("(\${*?)([1-9][0-9]|[1-9])\s*([..、、])\s*(?!\d)", r" \2\3\1", one_type)
                 item_no_info = pre_get_item_no('\n'+one_type, ans_item_no_type)  # 初步按非表格非排列的形式获取题号信息
                 print("初步题号11:", item_no_info)
                 if not item_no_info:
@@ -576,31 +576,31 @@ def ans_structure_step2(anss, item_type_classify, item_res, *group):
 
     ans_item_no_type = 1  # 初步定义答案的题号就是第一种类型!!!
     # 将序号前面是大写字母或分号的情况,加空
-    anss_str = re.sub(r"([A-H])\s*[..](\s*([1-4][0-9]|[1-9])\s*[..、、])", r"\1  \2", anss_str)
-    while re.search(r"([A-E])(([1-4][0-9]|[1-9])\s*[..、、]\s*[A-E])", anss_str):
-        anss_str = re.sub(r"([A-E])(([1-4][0-9]|[1-9])\s*[..、、]\s*[A-E])", r"\1  \2", anss_str)
+    anss_str = re.sub(r"([A-H])\s*[..](\s*([1-9][0-9]|[1-9])\s*[..、、])", r"\1  \2", anss_str)
+    while re.search(r"([A-E])(([1-9][0-9]|[1-9])\s*[..、、]\s*[A-E])", anss_str):
+        anss_str = re.sub(r"([A-E])(([1-9][0-9]|[1-9])\s*[..、、]\s*[A-E])", r"\1  \2", anss_str)
 
     def sub1(ss):
         if int(ss.group(3)) - int(ss.group(1)) == 1:
             return ss.group(1)+ss.group(2)+' '+ss.group(3)+'、'+ss.group(4)
-    anss_str = re.sub(r"([1-4][0-9]|[1-9])\s*([..、、]\s*[A-E])\s*([1-4][0-9]|[1-9])\s*([A-E]\s*([1-4][0-9]|[1-9])\s*[..、、])", sub1, anss_str)
-    anss_str = re.sub(r"([;;])(\s*([1-4][0-9]|[1-9])\s*[.、、])", r"\1  \2", anss_str)
+    anss_str = re.sub(r"([1-9][0-9]|[1-9])\s*([..、、]\s*[A-E])\s*([1-9][0-9]|[1-9])\s*([A-E]\s*([1-9][0-9]|[1-9])\s*[..、、])", sub1, anss_str)
+    anss_str = re.sub(r"([;;])(\s*([1-9][0-9]|[1-9])\s*[.、、])", r"\1  \2", anss_str)
 
     def sub2(ss):
         if int(ss.group(3)) - int(ss.group(2)) in [1, 2]:
             return ss.group(1)+"\n"+ss.group(3)+"、"+ss.group(4)
         else:
             return ss.group(0)
-    anss_str = re.sub(r"(\n\s*([1-4][0-9]|[1-9])\s*[..、、].+?)\n([1-4][0-9]|[1-9])\s*(?![..、、])([^\s\d]+)", sub2, anss_str, flags=re.S)
-    anss_str = re.sub("\n\s*(\${*?)([1-4][0-9]|[1-9])\s*([..、、])(.+?)", r"\n\2\3\1\4", anss_str)
-    anss_str = re.sub("\$(([1-4][0-9]|[1-9])\s*[..、、].+?)", r"$ \1", anss_str)
-    anss_str = re.sub("(\${*?)([1-4][0-9]|[1-9])\s*([..、、])\s*(?!\d)", r" \2\3\1", anss_str)
+    anss_str = re.sub(r"(\n\s*([1-9][0-9]|[1-9])\s*[..、、].+?)\n([1-9][0-9]|[1-9])\s*(?![..、、])([^\s\d]+)", sub2, anss_str, flags=re.S)
+    anss_str = re.sub("\n\s*(\${*?)([1-9][0-9]|[1-9])\s*([..、、])(.+?)", r"\n\2\3\1\4", anss_str)
+    anss_str = re.sub("\$(([1-9][0-9]|[1-9])\s*[..、、].+?)", r"$ \1", anss_str)
+    anss_str = re.sub("(\${*?)([1-9][0-9]|[1-9])\s*([..、、])\s*(?!\d)", r" \2\3\1", anss_str)
     # print(anss_str)
 
     item_no_info = pre_get_item_no('\n' + anss_str, ans_item_no_type)  # 按\n\d、
     print("初步题号:", item_no_info)  # 初步按非表格非排列的形式获取题号信息
     if not item_no_info and len(anss_str.replace(" ", "")) < 50:
-        item_0 = re.split(r"[1-9]\s*[..、、::]|[1-4][0-9]\s*[..、、::]", anss_str)
+        item_0 = re.split(r"[1-9]\s*[..、、::]|[1-9][0-9]\s*[..、、::]", anss_str)
         if len(item_0) > 1:
             anss_str = item_0[0]
         array_ans_no, array_ans = get_array_ans(anss_str, ans_no, item_res[0]['item_id'])
@@ -608,7 +608,7 @@ def ans_structure_step2(anss, item_type_classify, item_res, *group):
         ans_no.extend(array_ans_no)
         if len(item_0) > 1:
             all_item_ans.extend(item_0[1:])
-            ans_no.extend(re.findall(r"([1-9]|[1-4][0-9])\s*[..、、::]", anss_str))
+            ans_no.extend(re.findall(r"([1-9]|[1-9][0-9])\s*[..、、::]", anss_str))
 
         if len(ans_no) == item_type_num or len(ans_no) == len(item_res):  # 只有表格答案或排列答案的情况
             print('答案第1种切分方案:只有表格答案或排列答案的情况!')
@@ -646,15 +646,15 @@ def ans_structure_step2(anss, item_type_classify, item_res, *group):
                 else:
                     print("rest_item_split[0]:", rest_item_split[0])
                     # 找出非选择题的切分点
-                    item_0 = re.split(r"([1-9]\s*[..、、::]\s*(?![A-F])|[1-4][0-9]\s*[..、、::]\s*(?![A-F]))", rest_item_split[0], maxsplit=1)
+                    item_0 = re.split(r"([1-9]\s*[..、、::]\s*(?![A-F])|[1-9][0-9]\s*[..、、::]\s*(?![A-F]))", rest_item_split[0], maxsplit=1)
                     if len(item_0) > 1:  # 存在这样的切分点
-                        ans_no_idx0.insert(1, re.search(r"([1-9]|[1-4][0-9])\s*[..、、::]\s*(?![A-F])",
+                        ans_no_idx0.insert(1, re.search(r"([1-9]|[1-9][0-9])\s*[..、、::]\s*(?![A-F])",
                                                         rest_item_split[0]).start())
                         rest_item_split[0] = item_0[0]
                         rest_item_split.insert(1, "\n" + "".join(item_0[1:]))  # 加了一个,题号和索引也要加一个
-                        ans_no0.insert(0, int(re.findall("[1-4][0-9]|[1-9]", item_0[1])[0]))  # 这时补充的肯定与后面序号差别比较大
+                        ans_no0.insert(0, int(re.findall("[1-9][0-9]|[1-9]", item_0[1])[0]))  # 这时补充的肯定与后面序号差别比较大
                         # info0 = re.search(r"([1-9]|[1-4][0-9])\s*[..、、::]\s*(?![A-F])", rest_item_split[0])  # 有问题吧
-                        info0 = re.search(r"([1-9]|[1-4][0-9])\s*[..、、::]\s*(?![A-F])", rest_item_split[0])
+                        info0 = re.search(r"([1-9]|[1-9][0-9])\s*[..、、::]\s*(?![A-F])", rest_item_split[0])
                         if info0:  # ans_no0比len(rest_item_split)少
                             ans_no_idx0[0] = info0.start()
 
@@ -716,7 +716,7 @@ def get_array_ans(one_item, raw_ans_no, st_no, af_no=0, temp_type=""):
                     elif len(re.split("[、、]+", j.strip())) == len(no_list[k]):
                         one_item_ans.extend(re.split("[、、]+", j.strip()))
                     elif re.search("\d", j):  # 存在1-8AAADS 9.A 10.B 的情况
-                        new_rows = re.split("([1-9]|[1-4][0-9])\s*[..、、::]?\s*(?=[A-F])", j)
+                        new_rows = re.split("([1-9]|[1-9][0-9])\s*[..、、::]?\s*(?=[A-F])", j)
                         if len(new_rows)>2:
                             if len(re.findall("[A-Zc](?!\))", new_rows[0])) == len(no_list[k]):
                                 one_item_ans.extend(re.findall("[A-Zc](?<!\))", new_rows[0]))
@@ -746,7 +746,7 @@ def get_array_ans(one_item, raw_ans_no, st_no, af_no=0, temp_type=""):
                         one_item_ans.extend(re.split("[、、]+", j.strip()))
     elif (re.search("([1-9]|1[0-9])\s*[A-Zc]", one_item) and temp_type.replace("题", "")
              in ['选择', '单选', '多选', '不定选择']) or re.search("^[\d\sA-Zc..、、\n]+$", one_item):  # 1A 2B 3C 4D
-        row_ans = re.split("[1-4][0-9]|[1-9]", one_item)
+        row_ans = re.split("[1-9][0-9]|[1-9]", one_item)
         if re.search("[A-Fc]", row_ans[0].strip()):
             new_ans = re.findall("[A-Zc](?<!\))", row_ans[0])
             one_item_ans.extend(new_ans)
@@ -757,7 +757,7 @@ def get_array_ans(one_item, raw_ans_no, st_no, af_no=0, temp_type=""):
         else:
             row_ans = row_ans[1:]
         one_item_ans.extend(row_ans)
-        one_item_no.extend([int(i) for i in re.findall(r"[1-4][0-9]|[1-9]", one_item)])
+        one_item_no.extend([int(i) for i in re.findall(r"[1-9][0-9]|[1-9]", one_item)])
 
     else:
         # row_ans = sum([re.findall("[A-Z](?<!\))", str(k.group())) for k in re.finditer("[A-Z]{4,}", one_type)],[])

+ 2 - 2
structure/danti_structure.py

@@ -70,10 +70,10 @@ def single_parse(one_item, item_type, wordid):
         elif res_list[1].strip() == "【解析】":
             new_item_struct["parse"] = res_list[2]
 
-    item_ids = re.findall("^([1-5][0-9]|[1-9])\s*[..、、]", new_item_struct["stem"].strip())
+    item_ids = re.findall("^([1-9][0-9]|[1-9])\s*[..、、]", new_item_struct["stem"].strip())
     new_item_struct["topic_num"] = int(item_ids[0]) if item_ids else 0
 
-    new_item_struct["stem"] = re.sub("^([1-5][0-9]|[1-9])\s*[..、、]", "", new_item_struct["stem"].strip())
+    new_item_struct["stem"] = re.sub("^([1-9][0-9]|[1-9])\s*[..、、]", "", new_item_struct["stem"].strip())
     if len(new_item_struct["stem"].strip()) < 3:
         return "题干为空,请补充完整"
 

+ 7 - 7
structure/stems_structure.py

@@ -15,7 +15,7 @@ def stems_structure_byno(stem_con):
     try:
         while stem_con and ((re.search(r"[\u4e00-\u9fa5]", stem_con[0]) is None) or
                             (re.search(r"[一二三四]\s*[、..、]\s*[^必考基础综合中等]{2,4}题", stem_con[0]) is None
-                             and re.search(r"(^|\n)\s*[1-4][0-9]?\s*[..、、]((?!(答题卡|涂黑|本卷|2B铅笔|签字笔|密封线)).)*?$",
+                             and re.search(r"(^|\n)\s*[1-9][0-9]?\s*[..、、]((?!(答题卡|涂黑|本卷|2B铅笔|签字笔|密封线)).)*?$",
                                            stem_con[0]) is None)):
             del stem_con[0]
     except:
@@ -31,10 +31,10 @@ def stems_structure_byno(stem_con):
     #         return ss.group(0)
     # stem_str = re.sub(r"(\n\s*([1-4][0-9]|[1-9])\s*[..、、]((?!\n\s*([1-4][0-9]|[1-9])\s*[..、、]).)+?)\n+\s*([1-4][0-9]|[1-9])\s*(?![..、、])([^\s\d]+)", sub1, stem_str, flags=re.S)
     # 也可以用下面方法,但比较啰嗦
-    while re.search(r"(\n\s*([1-4][0-9]|[1-9])\s*[..、、]((?!\n\s*([1-4][0-9]|[1-9])\s*[..、、]).)+?)"
-                    r"\n+\s*([1-4][0-9]|[1-9])\s*(?![..、、])([^\s\d]+)", stem_str, re.S):
-        wrong_id_info = re.search(r"(\n\s*([1-4][0-9]|[1-9])\s*[..、、]((?!\n\s*([1-4][0-9]|[1-9])\s*[..、、]).)+?)"
-                                  r"\n+\s*([1-4][0-9]|[1-9])\s*(?![..、、])([^\s\d]+)", stem_str, re.S)
+    while re.search(r"(\n\s*([1-9][0-9]|[1-9])\s*[..、、]((?!\n\s*([1-9][0-9]|[1-9])\s*[..、、]).)+?)"
+                    r"\n+\s*([1-9][0-9]|[1-9])\s*(?![..、、])([^\s\d]+)", stem_str, re.S):
+        wrong_id_info = re.search(r"(\n\s*([1-9][0-9]|[1-9])\s*[..、、]((?!\n\s*([1-9][0-9]|[1-9])\s*[..、、]).)+?)"
+                                  r"\n+\s*([1-9][0-9]|[1-9])\s*(?![..、、])([^\s\d]+)", stem_str, re.S)
         stem_str = stem_str.replace(wrong_id_info.group(0),
                                     wrong_id_info.group(1)+"\n"+wrong_id_info.group(5)+"、"+wrong_id_info.group(6))
     # print(stem_str)
@@ -198,10 +198,10 @@ def stems_structure_byno(stem_con):
                 # 多图在一起的情况进行拆分
                 # if len(re.findall(r"第?\(?([1-9]|[1-4][0-9])\)?\s*题图", one_item)) > 1 and \
                 #         re.search(r"<imgsrc\d.+?\n+\s*第?\(?([1-9]|[1-4][0-9])\)?\s*题图", one_item, re.S):
-                pic_info = re.search(r"(<imgsrc\d.+?)\n+\s*((第?\(?([1-9]|[1-4][0-9])\)?\s*题图.?\s*){2,})", one_item, re.S)
+                pic_info = re.search(r"(<imgsrc\d.+?)\n+\s*((第?\(?([1-9]|[1-9][0-9])\)?\s*题图.?\s*){2,})", one_item, re.S)
                 if pic_info:
                     pic_list = re.findall(r"<imgsrc\d.*?/>", pic_info.group(1))
-                    pic_w = re.findall("([1-9]|[1-4][0-9])[))]?\s*(?=题)", pic_info.group(2))
+                    pic_w = re.findall("([1-9]|[1-9][0-9])[))]?\s*(?=题)", pic_info.group(2))
                     if len(pic_list) >= len(pic_w):
                         pic_no = {int(p): pic_list[len(pic_list) - len(pic_w) + k] for k, p in enumerate(pic_w)}
                         dd["stem"] = dd["stem"].replace(pic_info.group(2), "")

+ 4 - 4
structure/three_parse_structure.py

@@ -150,7 +150,7 @@ def split_by_keywords(con_list):
     # 去掉多余空格,作用不大
     con2 = ["【delete】" if (k < len(con_list) - 1 and v.strip() == "" and (
             re.match(r"【(答案|解析)】|(答案|解析)\s*[::]|<imgsrc\d+|\s+", con_list[k + 1].strip()) or
-            re.match(r"(([1-9]|[1-4][0-9])\s*[..、、]|[一二三四五六七八九十]\s*[、..、]\s*[^必考基础综合中等]{2,4}题)",
+            re.match(r"(([1-9]|[1-9][0-9])\s*[..、、]|[一二三四五六七八九十]\s*[、..、]\s*[^必考基础综合中等]{2,4}题)",
                      con_list[k + 1].strip()) is None))
                           or (k > 0 and v.strip() == "" and (
                 re.match(r"【(答案|解析)】$|(答案|解析)\s*[::]", con_list[k - 1].strip()) or
@@ -191,7 +191,7 @@ def split_by_keywords(con_list):
         else:
             item_no = []
             subcon = re.split(r"((?<=\n)\s*【答案】|(?<=\n)\s*【解析】)\n?", items_con.strip())
-            pattern1 = re.compile(r"([1-9]|[1-4][0-9])\s*[..、、].+?")
+            pattern1 = re.compile(r"([1-9]|[1-9][0-9])\s*[..、、].+?")
             if re.match(pattern1, subcon[0].strip()):
                 st_id = re.match(pattern1, subcon[0].strip()).group(1)
                 if int(st_id) > 1:
@@ -239,7 +239,7 @@ def split_by_keywords(con_list):
                     subcon = re.split(r"((?<=\n)\s*【答案】|(?<=\n)\s*【解析】)\n?", one_type.strip())
                     # index根据第一道题的题号进行纠正
                     item_no = []
-                    pattern1 = re.compile(r"([1-9]|[1-4][0-9])\s*[..、、].+?")
+                    pattern1 = re.compile(r"([1-9]|[1-9][0-9])\s*[..、、].+?")
                     if re.match(pattern1, subcon[0].strip()):
                         st_id = re.match(pattern1, subcon[0].strip()).group(1)
                         if num == 0 and int(st_id) != 1:
@@ -343,7 +343,7 @@ def split_by_topicno(con_list):
 
     # 对最后一个题后面带个别答案(无答案页)
     if res:
-        pattern1 = re.search('\n\s*([1-9]|[1-4][0-9])\s*[..、、]\s*(解\s*[::]|【解析|【答案)', res[-1]["stem"])
+        pattern1 = re.search('\n\s*([1-9]|[1-9][0-9])\s*[..、、]\s*(解\s*[::]|【解析|【答案)', res[-1]["stem"])
         if pattern1:
             breakp = pattern1.start()
             ans_str = res[-1]["stem"][breakp:]

+ 14 - 3
utils/field_eq2latex.py

@@ -4,6 +4,9 @@
 
 """
 域公式转latex
+域公式意义:\al 列内左对齐;\ac 列内居中对齐;\ar 列内右对齐
+        \r(,):根号;
+        \s(上标, 下标):设置上下标;
 """
 import re, os
 import configs
@@ -199,6 +202,12 @@ def zifu_match_combine(split_eq):
                         info1 = re.search(r"(\\o\\al|\\s)\((.*?),(.*?)\)$", "".join(split_eq[k - subk - 1 - 1: k + 1]))
                         if info1:
                             new_s = "_{{{sub}}}^{{{sup}}}".format(sub=info1.group(3), sup=info1.group(2))
+                            if info1.group(1) == "\\o\\al" and (not info1.group(3) or not info1.group(2)):
+                                temp_s =  info1.group(2) + info1.group(3)
+                                temp_s_info1 = re.search("<sub>(.*?)</sub>",temp_s)
+                                temp_s_info2 = re.search("<sup>(.*?)</sup>",temp_s)
+                                if temp_s_info1 and temp_s_info2:
+                                    new_s = "_{{{}}}^{{{}}}".format(temp_s_info1.group(1), temp_s_info2.group(1))
                             new_s = re.sub("</?su[bp]>|\s", "", new_s)
                             new_split_eq = split_eq[:k - subk - 1 - 1]
                             new_split_eq.append(new_s)
@@ -362,9 +371,10 @@ if __name__ == '__main__':
     # res = requests.get(r"http://localhost:9001/FieldEq/Eq2Png/?eqcode=" + f, timeout=30).text
     # print(json.loads(res).replace("\r\n", ""))
     # f = "【解】解析 (1)因OB绳处于竖直方向,所以B球处于平衡状态,AB绳上的拉力为零,OB绳对小球的拉力F<sub>OB</sub>=mg. (3分)<br/>(2)A球在重力mg、水平拉力F和OA绳的拉力F<sub>OA</sub>三力作用下平衡,所以OA绳对小球的拉力F<sub>OA</sub>=【域公式:eq \\\\f(mg,cos 60°)】=2mg. (3分)<br/>(3)作用力F=mgtan 60°=【域公式:eq \\\\r(3)】mg. (3分)<br/>答案 (1)mg (2)2mg (3)【域公式:eq \\\\r(3)】mg"
-    f = "B.【域公式:eq \\r(<sup>3</sup>,\\f(1,4))】"
-    aa = get_latex(f, 1)
-    print(aa)
+    # f = "B.【域公式:eq \\r(<sup>3</sup>,\\f(1,4))】"
+    # f1 = "由动能定理得-W<sub>克</sub><sub>f</sub>-mgh=0-【域公式:eq \\f(1,2)】mv【域公式:eq \\o\\al(<sub>B</sub><sup>2</sup>,)】"
+    # aa = get_latex(f1, 1)
+    # print(aa)
 
     # tt = r"${ } _ { n H C H O } \rightarrow f H _ { 2 } C - O _ { n }$"
     # def sub1(ss):
@@ -396,3 +406,4 @@ if __name__ == '__main__':
     #             eqs = re.sub("<sub>(.+?)</sub>", r"\s(,\1)", i.group(1))
     #             eqs = re.sub("<sup>(.+?)</sup>", r"\s(\1,)", eqs)
     #             new_eqs2raw[eqs] = i.group(0)
+    # 导入comtypes模块

+ 1 - 1
utils/insert_keywords.py

@@ -23,7 +23,7 @@ def get_con(subcon, item_no_type, item_no, **kwargs):
             ssub = subcon[id].strip().split("\n")  # 首尾空行先去掉
             blank_line = [i for i, v in enumerate(ssub) if v.strip() == ""]  # 空格的索引
             #  索引to题号字典,获取可能的题号的位置
-            pattern1 = r"([1-9]|[1-4][0-9])\s*[..、、]" if item_no_type==1 else r"\(([1-9]|[1-4][0-9])\)\s*[..、、]?"
+            pattern1 = r"([1-9]|[1-9][0-9])\s*[..、、]" if item_no_type==1 else r"\(([1-9]|[1-9][0-9])\)\s*[..、、]?"
             line_topicno_dict = {i: re.match(pattern1, v.strip()).group(1)
                                  for i, v in enumerate(ssub)
                                  if re.match(pattern1, v.strip())}

+ 1 - 1
utils/ruku_opera.py

@@ -208,7 +208,7 @@ class Ruku():
                     mj_ltx = svgp_ltx[img_path.replace(".png", ".svg")]  #.replace("\\\\", "\\")
                     w = shape[0] / 4 * 1.2
                     h = shape[1] / 4 * 1.2
-                    if re.search(r"^{?[A-Z、\s]+\}?$", mj_ltx):
+                    if re.search(r"^{?[A-Z、\s{_\}\d]+\}?$", mj_ltx):
                         w = shape[0] / 4
                         h = shape[1] / 4
                     mjmath_online = '<img src="http://' + configs.public_bucket_addr + imgname_online \

+ 17 - 17
utils/topic_no.py

@@ -26,11 +26,11 @@ def judge_item_no_type(items_con):
     # 判断该份试卷的题号类型:(1)or 1、
     item_no_type = 1  # 题号目前有两种类型 1、 和  (1)
     all_con = table_label_cleal(items_con)
-    item_no_info = [(m.start(), m.group(1)) for m in re.finditer(r'\n+\s*([1-9]|[1-4][0-9])\s*[..、、::]', all_con) if m]
+    item_no_info = [(m.start(), m.group(1)) for m in re.finditer(r'\n+\s*([1-9]|[1-9][0-9])\s*[..、、::]', all_con) if m]
     if len(item_no_info) <= 2:
         # item_no = [int(no) for no in re.findall(r'\n+\s*[((]\s*([1-9]|[1-4][0-9])\s*[))]\s*[..、、]?', all_con)]
         item_no_info2 = [(m.start(), m.group(1)) for m in
-                        re.finditer(r'\n+\s*[((]\s*([1-9]|[1-4][0-9])\s*[))]\s*[..、、::]?', all_con) if m]
+                        re.finditer(r'\n+\s*[((]\s*([1-9]|[1-9][0-9])\s*[))]\s*[..、、::]?', all_con) if m]
         if len(item_no_info) <= 6:
             print("本份试卷题号有问题!")
             item_no_type = 1
@@ -47,7 +47,7 @@ def judge_ans_no_type(items_ans, item_type_num):
     ans_item_no_type = 1
     for num, one_type in enumerate(items_ans):
         one_type = table_label_cleal("\n" + one_type)
-        one_type_no = [int(no) for no in re.findall(r'\n+\s*([1-9]|[1-4][0-9])\s*[..、、::]', one_type)]
+        one_type_no = [int(no) for no in re.findall(r'\n+\s*([1-9]|[1-9][0-9])\s*[..、、::]', one_type)]
         if not one_type_no and "table" in one_type:  # 有的答案放在表格中,也需先记后纠错
             if not ans_item_no:
                 ans_item_no.extend(range(1, item_type_num[num][1] + 1))  # 表格中的答案默认从1开始!!!!
@@ -58,7 +58,7 @@ def judge_ans_no_type(items_ans, item_type_num):
         ans_item_no = []
         for num, one_type in enumerate(items_ans):
             one_type = table_label_cleal("\n" + one_type)
-            one_type_no = [int(no) for no in re.findall(r'\n+\s*\(([1-9]|[1-4][0-9])\)\s*[..、、::]?', one_type)]
+            one_type_no = [int(no) for no in re.findall(r'\n+\s*\(([1-9]|[1-9][0-9])\)\s*[..、、::]?', one_type)]
             ans_item_no.extend(one_type_no)
             if len(ans_item_no) > 6:
                 ans_item_no_type = 2
@@ -72,14 +72,14 @@ def pre_get_item_no(items_con, item_no_type, flag=0):
     :param item_no_type:
     :return:
     """
-    item_no_info = [(m.start(), m.group(1)) for m in re.finditer(r'\n+\s*([1-9]|[1-4][0-9])\s*[..、、::]', items_con) if m] \
+    item_no_info = [(m.start(), m.group(1)) for m in re.finditer(r'\n+\s*([1-9]|[1-9][0-9])\s*[..、、::]', items_con) if m] \
         if item_no_type == 1 else [(m.start(), m.group(1)) for m in
-                                   re.finditer(r'\n+\s*[((]\s*([1-9]|[1-4][0-9])\s*[))]\s*[..、、::]?', items_con) if m]
+                                   re.finditer(r'\n+\s*[((]\s*([1-9]|[1-9][0-9])\s*[))]\s*[..、、::]?', items_con) if m]
     if flag:
         item_no_info = [(m.start(), m.group(1)) for m in re.finditer(
-            r'\n+\s*([1-9]|[1-4][0-9])\s*[((]\s*1\s*[))]', items_con) if m] \
+            r'\n+\s*([1-9]|[1-9][0-9])\s*[((]\s*1\s*[))]', items_con) if m] \
             if item_no_type == 1 else [(m.start(), m.group(1)) for m in
-                                       re.finditer(r'\n+\s*[((]\s*([1-9]|[1-4][0-9])\s*[))]', items_con) if m]
+                                       re.finditer(r'\n+\s*[((]\s*([1-9]|[1-9][0-9])\s*[))]', items_con) if m]
     return item_no_info
 
 
@@ -254,9 +254,9 @@ def get_many_ans_no(items_str, ans_item_no_type, reget=0):
         # 这里在遇到前面没空格的两位数字的情况下分拿1位和拿2位,不太准,应该是各种组合
         # 最后选择取前面不是数字的的序号
         if ans_item_no_type == 1:
-            for m in re.finditer(r'\n+\s*([1-9]|[1-4][0-9])\s*[..、、::]'
-                                 r'|(?<![::..、、+\-*/((\[{])\s+([1-9]|[1-4][0-9])\s*[..、、::](?!png)'
-                                 r'|(?<![::..、、+\-*/((\[{\d])([1-9]|[1-4][0-9])\s*[..、、::](?!png)', items_str):
+            for m in re.finditer(r'\n+\s*([1-9]|[1-9][0-9])\s*[..、、::]'
+                                 r'|(?<![::..、、+\-*/((\[{])\s+([1-9]|[1-9][0-9])\s*[..、、::](?!png)'
+                                 r'|(?<![::..、、+\-*/((\[{\d])([1-9]|[1-9][0-9])\s*[..、、::](?!png)', items_str):
                 aa = m.groups()[0]
                 if m.groups()[1]:
                     aa = m.groups()[1]
@@ -277,8 +277,8 @@ def get_many_ans_no(items_str, ans_item_no_type, reget=0):
                 #     ans_no_idx1.append(m.start()+1)
                 #     ans_no_idx2.append(m.start())
         else:
-            for m in re.finditer(r'\n+\s*[((]\s*([1-9]|[1-4][0-9])\s*[))]\s*[..、、::]?'
-                                 r'|(?<![::+\-、、*/])\s*[((]\s*([1-9]|[1-4][0-9])\s*[))]\s*[..、、::]?', items_str):
+            for m in re.finditer(r'\n+\s*[((]\s*([1-9]|[1-9][0-9])\s*[))]\s*[..、、::]?'
+                                 r'|(?<![::+\-、、*/])\s*[((]\s*([1-9]|[1-9][0-9])\s*[))]\s*[..、、::]?', items_str):
                 aa = m.groups()[0] if m.groups()[0] else m.groups()[1]
                 ans_no1.append(int(aa))
                 ans_no_idx1.append(m.start())
@@ -298,15 +298,15 @@ def get_many_ans_no(items_str, ans_item_no_type, reget=0):
     else:
         #  序号前要求换行或空格
         if ans_item_no_type == 1:
-            for m in re.finditer(r'\n+\s*([1-9]|[1-4][0-9])\s*[..、、::]'
-                                 r'|(?<![::..、、+\-*/((\[{])\s+([1-9]|[1-4][0-9])\s*[..、、::](?!png)', items_str):
+            for m in re.finditer(r'\n+\s*([1-9]|[1-9][0-9])\s*[..、、::]'
+                                 r'|(?<![::..、、+\-*/((\[{])\s+([1-9]|[1-9][0-9])\s*[..、、::](?!png)', items_str):
                 aa = m.groups()[0] if m.groups()[0] else m.groups()[1]
                 ans_no1.append(int(aa))
                 ans_no_idx1.append(m.start())
 
         else:
-            for m in re.finditer(r'\n+\s*[((]\s*([1-9]|[1-4][0-9])\s*[))]\s*[..、、::]?'
-                                 r'|(?<![::+\-、、*/])\s+[((]\s*([1-9]|[1-4][0-9])\s*[))]\s*[..、、::]?', items_str):
+            for m in re.finditer(r'\n+\s*[((]\s*([1-9]|[1-9][0-9])\s*[))]\s*[..、、::]?'
+                                 r'|(?<![::+\-、、*/])\s+[((]\s*([1-9]|[1-9][0-9])\s*[))]\s*[..、、::]?', items_str):
                 aa = m.groups()[0] if m.groups()[0] else m.groups()[1]
                 ans_no1.append(int(aa))
                 ans_no_idx1.append(m.start())

+ 17 - 17
utils/washutil.py

@@ -280,7 +280,7 @@ class HtmlWash():
         html2txt = re.sub(r'<p>\s*(解\s*[::])', r"<p>【解答】", str(html2txt))
         html2txt = re.sub(r'【[^【】]*?(答案|[解分][析答]|详解|点[评睛])[^【】]*?】', r"【\1】", str(html2txt))
         html2txt = re.sub(r'(\n\s*|<p>\s*|\s{2,}|\n\s*\d{,2}\s*[、..、]\s*)(答案|解析|解答|详解|点评|点睛|考点|专题)\s*[::]', r"\1【\2】", str(html2txt))
-        html2txt = re.sub(r'(\n|^|<p>)\s*(([1-9]|[1-4][0-9])\s*[..、、])?\s*\[\s*(答案|解析|解答|详解|点评|点睛|考点|专题)\s*\]',
+        html2txt = re.sub(r'(\n|^|<p>)\s*(([1-9]|[1-9][0-9])\s*[..、、])?\s*\[\s*(答案|解析|解答|详解|点评|点睛|考点|专题)\s*\]',
                           r"\1\2【\4】", str(html2txt))
         html2txt = re.sub(r'([A-D])\s*\[\s*(解析|解答|详解|点评|点睛|考点|专题)\s*\]', r"\1\n【\2】", str(html2txt))
         html2txt = re.sub(r'(\n|^|<p>)\s*(分析)\s*[::]', r"【\2】", str(html2txt))
@@ -310,35 +310,35 @@ class HtmlWash():
                 .replace("【非选择题】", "")
 
         # =====选项的处理=====
-        html2txt = re.sub(r'(<p>\s*([1-9]|[1-4][0-9])\s*[..、、].+?[((]\s*[))])\s*(A\s*[..、、][^/]*?</p>)',
+        html2txt = re.sub(r'(<p>\s*([1-9]|[1-9][0-9])\s*[..、、].+?[((]\s*[))])\s*(A\s*[..、、][^/]*?</p>)',
                           r"\1</p>\n<p>\3", str(html2txt))
 
         # =====题号的处理=====
-        html2txt = re.sub(r'([ED]\s*[、..、].*?(\s|</su[pb]>\s*))(([1-9]|[1-4][0-9])\s*[、..、])',
+        html2txt = re.sub(r'([ED]\s*[、..、].*?(\s|</su[pb]>\s*))(([1-9]|[1-9][0-9])\s*[、..、])',
                           r"\1</p>\n<p>\3", html2txt)
-        html2txt = re.sub(r'((</?p>|\n)\s*(<img src=.*?"\s*/?>\s*)?([1-9]|[1-4][0-9]))\s*'
+        html2txt = re.sub(r'((</?p>|\n)\s*(<img src=.*?"\s*/?>\s*)?([1-9]|[1-9][0-9]))\s*'
                           r'([((]\s*(\d{1,2}[.\s\d]*?分|.{2,3}题?)\s*[))]|解析?\s*[::]|【解析】)', r"</p>\1、\5", html2txt)
-        html2txt = re.sub(r"<p>\s*([1-9]|[1-4][0-9])\s*([((]20\d{2}\s*[\u4e00-\u9fa5、、]{2,9}[))])", r"<p>\1、\2",
+        html2txt = re.sub(r"<p>\s*([1-9]|[1-9][0-9])\s*([((]20\d{2}\s*[\u4e00-\u9fa5、、]{2,9}[))])", r"<p>\1、\2",
                           html2txt)
-        html2txt = re.sub(r"<p>\s*([1-9]|[1-4][0-9])\s*(【(解析?|答案?)】|(解析?|答案?)\s*[::]|\[(答案|解析)\])", r"<p>\1、\2",
+        html2txt = re.sub(r"<p>\s*([1-9]|[1-9][0-9])\s*(【(解析?|答案?)】|(解析?|答案?)\s*[::]|\[(答案|解析)\])", r"<p>\1、\2",
                           html2txt)
-        html2txt = re.sub(r"<p>\s*([1-9]|[1-4][0-9])\s*([((]\s*\d+\s*分?\s*[))])?(【(解析?|答案?)】|(解析?|答案?)\s*[::]"
+        html2txt = re.sub(r"<p>\s*([1-9]|[1-9][0-9])\s*([((]\s*\d+\s*分?\s*[))])?(【(解析?|答案?)】|(解析?|答案?)\s*[::]"
                           r"|\[(答案|解析)\])", r"<p>\1、\2\3", html2txt)
-        html2txt = re.sub(r"(</?p>|\n)\s*(<img src=((?!/>).)+?/>)\s*([1-9]|[1-4][0-9])\s*"
+        html2txt = re.sub(r"(</?p>|\n)\s*(<img src=((?!/>).)+?/>)\s*([1-9]|[1-9][0-9])\s*"
                           r"([((]20\d{2}\s*[\u4e00-\u9fa5、、]{2,9}[))])", r"<p>\2</p>" + "\n" + r"<p>\4、\5", html2txt)  # 【susp_img】
         html2txt = re.sub(r'(</?p>|\n)((\s*<su[bp]>\s*)?<img src=.*? height="[\d.]+p[tx]"\s*/?>(\s*</su[bp]>)?\s*)'
-                          r'(([1-9]|[1-4][0-9])\s*[、..、])', r"</p>\2</p>" + "\n" + r"\5", html2txt)
-        html2txt = re.sub(r"(<p>((?!<p>).)+?(\s|[/\"]>))(([1-9]|[1-4][0-9])\s*[、..、].{,20}本[大小]?题\d+分)",
+                          r'(([1-9]|[1-9][0-9])\s*[、..、])', r"</p>\2</p>" + "\n" + r"\5", html2txt)
+        html2txt = re.sub(r"(<p>((?!<p>).)+?(\s|[/\"]>))(([1-9]|[1-9][0-9])\s*[、..、].{,20}本[大小]?题\d+分)",
                           r"\1</p>" + "\n<p>" + r"\4", html2txt)
         html2txt = re.sub(r"</?p>((\s*<su[bp]>\s*)?<img src=.*?/>(\s*</su[bp]>)?"
-                          r"((\s*<su[bp]>\s*)?<img src=((?!/>).)+?/>(\s*</su[bp]>)?)*?\s*)\s*(([1-9]|[1-4][0-9])\s*[、..、])",
+                          r"((\s*<su[bp]>\s*)?<img src=((?!/>).)+?/>(\s*</su[bp]>)?)*?\s*)\s*(([1-9]|[1-9][0-9])\s*[、..、])",
                           r"</p>\1</p>" + "\n<p>" + r"\8", html2txt, flags=re.S)
-        html2txt = re.sub(r'(<p>\s*[一二三四五六七八九十].*?题\s*\(.+?分.*?\))\s*(([1-9]|[1-4][0-9])\s*[、..、].*?)</p>',
+        html2txt = re.sub(r'(<p>\s*[一二三四五六七八九十].*?题\s*\(.+?分.*?\))\s*(([1-9]|[1-9][0-9])\s*[、..、].*?)</p>',
                           r"\1</p>\n<p>\2</p>", html2txt)
-        html2txt = re.sub(r'(<p>\s*[一二三四五六七八九十].*?题\s*\(.+?分.*?\))\s*(([1-9]|[1-4][0-9])\s*[、..、].*?)</p>',
+        html2txt = re.sub(r'(<p>\s*[一二三四五六七八九十].*?题\s*\(.+?分.*?\))\s*(([1-9]|[1-9][0-9])\s*[、..、].*?)</p>',
                           r"\1</p>\n<p>\2</p>", html2txt)
-        html2txt = re.sub(r'(<p>.*?[..]{6,}\s*\d+分)\s*(([1-9]|[1-4][0-9])\s*[、..、].*?)</p>', r"\1</p>\n<p>\2</p>", html2txt)
-        html2txt = re.sub(r'([1-9]|[1-4][0-9])\s*([((]\s*\d{1,2}[.\s\d]*?分\s*[))])\s*[、..、]', r"\1" + "、" + r"\2", html2txt)
+        html2txt = re.sub(r'(<p>.*?[..]{6,}\s*\d+分)\s*(([1-9]|[1-9][0-9])\s*[、..、].*?)</p>', r"\1</p>\n<p>\2</p>", html2txt)
+        html2txt = re.sub(r'([1-9]|[1-9][0-9])\s*([((]\s*\d{1,2}[.\s\d]*?分\s*[))])\s*[、..、]', r"\1" + "、" + r"\2", html2txt)
 
         # =====图片的处理=====
         # 1>>根据图片宽高的异常值判断删除隐藏图片
@@ -449,9 +449,9 @@ class HtmlWash():
 def del_no(item, item_no_type=1):
     """去开头的题号"""
     if item_no_type == 2:
-        item = re.sub(r'^\n*\s*[((]\s*([1-9]|[1-4][0-9])\s*[))]\s*[..、、::]?', "", item)
+        item = re.sub(r'^\n*\s*[((]\s*([1-9]|[1-9][0-9])\s*[))]\s*[..、、::]?', "", item)
         return item
-    item = re.sub(r'^\n*\s*([1-9]|[1-4][0-9])\s*[..、、::]', "", item)
+    item = re.sub(r'^\n*\s*([1-9]|[1-9][0-9])\s*[..、、::]', "", item)
     return item