20230209
This commit is contained in:
1 parent
e9356da639
commit
afdeae1fee
1 file changed
+25
-4
+25
-4
@@ -100,11 +100,32 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": 3,
|
||||||
"metadata": {
|
"metadata": {
|
||||||
|
"execution": {
|
||||||
|
"iopub.execute_input": "2023-01-31T07:25:58.845092Z",
|
||||||
|
"iopub.status.busy": "2023-01-31T07:25:58.844564Z",
|
||||||
|
"iopub.status.idle": "2023-01-31T07:26:05.074689Z",
|
||||||
|
"shell.execute_reply": "2023-01-31T07:26:05.072976Z",
|
||||||
|
"shell.execute_reply.started": "2023-01-31T07:25:58.845044Z"
|
||||||
|
},
|
||||||
"tags": []
|
"tags": []
|
||||||
},
|
},
|
||||||
"outputs": [],
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"2 扫描全能王 2023-01-31 15.17_1.jpg\n",
|
||||||
|
"3 扫描全能王 2023-01-31 15.17_2.jpg\n",
|
||||||
|
"4 扫描全能王 2023-01-31 15.17_3.jpg\n",
|
||||||
|
"5 扫描全能王 2023-01-31 15.17_4.jpg\n",
|
||||||
|
"6 扫描全能王 2023-01-31 15.17_5.jpg\n",
|
||||||
|
"7 扫描全能王 2023-01-31 15.17_6.jpg\n",
|
||||||
|
"8 扫描全能王 2023-01-31 15.17_7.jpg\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"import os,sys\n",
|
"import os,sys\n",
|
||||||
"from aip import AipOcr\n",
|
"from aip import AipOcr\n",
|
||||||
@@ -137,7 +158,7 @@
|
|||||||
"options[\"detect_language\"] = \"true\"\n",
|
"options[\"detect_language\"] = \"true\"\n",
|
||||||
"options[\"probability\"] = \"true\"\n",
|
"options[\"probability\"] = \"true\"\n",
|
||||||
"dict1 = {}\n",
|
"dict1 = {}\n",
|
||||||
"fi_path = os.getcwd()+'/pic'\n",
|
"fi_path = os.getcwd()+'/data/pic'\n",
|
||||||
"fl = os.listdir(fi_path)\n",
|
"fl = os.listdir(fi_path)\n",
|
||||||
"fl.sort()\n",
|
"fl.sort()\n",
|
||||||
"i = 1\n",
|
"i = 1\n",
|
||||||
@@ -153,7 +174,7 @@
|
|||||||
" print(i,fl1)\n",
|
" print(i,fl1)\n",
|
||||||
" #print('\\n'.join([w['words'] for w in result['words_result']]))\n",
|
" #print('\\n'.join([w['words'] for w in result['words_result']]))\n",
|
||||||
" #print('\\n')\n",
|
" #print('\\n')\n",
|
||||||
"with open('中华药膳全书学做药膳不生病.json','w') as fl2:\n",
|
"with open('合同.json','w') as fl2:\n",
|
||||||
" json.dump(dict1,fl2,ensure_ascii=False) "
|
" json.dump(dict1,fl2,ensure_ascii=False) "
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in new issue
Block a user