From 81f191f9830967778c4a5680336634d2e84c178f Mon Sep 17 00:00:00 2001 From: maxmon <541182180@qq.com> Date: Mon, 21 Jun 2021 01:07:40 +0800 Subject: [PATCH] =?UTF-8?q?+=20=E6=B8=85=E9=99=A4=E6=97=A0=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E9=A1=B9=E7=9B=AE=E6=96=87=E4=BB=B6=E5=A4=B9=EF=BC=8C?= =?UTF-8?q?=E5=B9=B6=E5=BF=BD=E7=95=A5=E9=A1=B9=E7=9B=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- be/.gitignore | 3 ++- be/app/api/v1/project.py | 3 +++ be/app/projects/123/anno.json | 1 - be/app/projects/123/config.json | 1 - be/app/projects/222/anno.json | 1 - be/app/projects/222/config.json | 1 - be/app/projects/demo1/config.json | 1 - be/app/projects/demo4/config.json | 1 - be/app/projects/xixixi/config.json | 1 - be/app/projects/医疗/anno.json | 1 - be/app/projects/医疗/config.json | 1 - be/app/projects/项目/config.json | 1 - 12 files changed, 5 insertions(+), 11 deletions(-) delete mode 100644 be/app/projects/123/anno.json delete mode 100644 be/app/projects/123/config.json delete mode 100644 be/app/projects/222/anno.json delete mode 100644 be/app/projects/222/config.json delete mode 100644 be/app/projects/demo1/config.json delete mode 100644 be/app/projects/demo4/config.json delete mode 100644 be/app/projects/xixixi/config.json delete mode 100644 be/app/projects/医疗/anno.json delete mode 100644 be/app/projects/医疗/config.json delete mode 100644 be/app/projects/项目/config.json diff --git a/be/.gitignore b/be/.gitignore index a47fb1d..5a62bb7 100644 --- a/be/.gitignore +++ b/be/.gitignore @@ -1,2 +1,3 @@ .idea -__pycache__ \ No newline at end of file +__pycache__ +app/projects/* \ No newline at end of file diff --git a/be/app/api/v1/project.py b/be/app/api/v1/project.py index e86a5b3..236977c 100644 --- a/be/app/api/v1/project.py +++ b/be/app/api/v1/project.py @@ -20,6 +20,9 @@ def create_project(): make_dir(PROJECT_PATH.format(project_name)) write_json(PROJECT_CONFIG_PATH.format(project_name), param) + anno_path = ANNO_OUTPUT_PATH.format(project_name) + if not os.path.exists(anno_path): + write_json(anno_path, []) ret_info.errCode = 0 diff --git a/be/app/projects/123/anno.json b/be/app/projects/123/anno.json deleted file mode 100644 index 9eba42c..0000000 --- a/be/app/projects/123/anno.json +++ /dev/null @@ -1 +0,0 @@ -[{"fileName": "文本1 - 副本 - 副本 (3).txt", "annoDetails": "[]"}, {"fileName": "文本1 - 副本 - 副本 (4) - 副本.txt", "annoDetails": "[]"}, {"fileName": null, "annoDetails": "[]"}, {"fileName": "", "annoDetails": "[]"}] \ No newline at end of file diff --git a/be/app/projects/123/config.json b/be/app/projects/123/config.json deleted file mode 100644 index ae98aac..0000000 --- a/be/app/projects/123/config.json +++ /dev/null @@ -1 +0,0 @@ -{"projectName": "123", "projectType": "命名实体识别", "entityTypes": "[{\"type\":\"123\",\"color\":\"#c15892\"}]"} \ No newline at end of file diff --git a/be/app/projects/222/anno.json b/be/app/projects/222/anno.json deleted file mode 100644 index fa22eeb..0000000 --- a/be/app/projects/222/anno.json +++ /dev/null @@ -1 +0,0 @@ -[{"fileName": "", "annoDetails": "[]"}] \ No newline at end of file diff --git a/be/app/projects/222/config.json b/be/app/projects/222/config.json deleted file mode 100644 index 3605d53..0000000 --- a/be/app/projects/222/config.json +++ /dev/null @@ -1 +0,0 @@ -{"projectName": "222", "projectType": "命名实体识别", "entityTypes": "[{\"type\":\"23\",\"color\":\"#2ea5f5\"},{\"type\":\"12\",\"color\":\"#f8e817\"}]"} \ No newline at end of file diff --git a/be/app/projects/demo1/config.json b/be/app/projects/demo1/config.json deleted file mode 100644 index ebd14c1..0000000 --- a/be/app/projects/demo1/config.json +++ /dev/null @@ -1 +0,0 @@ -{"projectName": "demo1", "projectType": "nlp 标注", "entityTypes": "[{\"type\":\"person1\",\"color\":\"#e61490\"},{\"type\":\"location\",\"color\":\"#0aab8a\"},{\"type\":\"organiztion\",\"color\":\"#2770cd\"},{\"type\":\"123\",\"color\":\"#1c7a82\"}]"} \ No newline at end of file diff --git a/be/app/projects/demo4/config.json b/be/app/projects/demo4/config.json deleted file mode 100644 index f6bc285..0000000 --- a/be/app/projects/demo4/config.json +++ /dev/null @@ -1 +0,0 @@ -{"projectName": "demo4", "projectType": "nlp 标注", "entityTypes": [{"type": "person1", "color": "#e61490"}, {"type": "location", "color": "#0aab8a"}, {"type": "organiztion", "color": "#2770cd"}, {"type": "123", "color": "#1c7a82"}]} \ No newline at end of file diff --git a/be/app/projects/xixixi/config.json b/be/app/projects/xixixi/config.json deleted file mode 100644 index f4840aa..0000000 --- a/be/app/projects/xixixi/config.json +++ /dev/null @@ -1 +0,0 @@ -{"projectName": "xixixi", "projectType": "命名实体识别", "entityTypes": "[]"} \ No newline at end of file diff --git a/be/app/projects/医疗/anno.json b/be/app/projects/医疗/anno.json deleted file mode 100644 index a28e9ee..0000000 --- a/be/app/projects/医疗/anno.json +++ /dev/null @@ -1 +0,0 @@ -[{"fileName": null, "annoDetails": "[]"}, {"fileName": "", "annoDetails": "[]"}] \ No newline at end of file diff --git a/be/app/projects/医疗/config.json b/be/app/projects/医疗/config.json deleted file mode 100644 index ad9ae21..0000000 --- a/be/app/projects/医疗/config.json +++ /dev/null @@ -1 +0,0 @@ -{"projectName": "医疗", "projectType": "命名实体识别", "entityTypes": "[{\"type\":\"pos\",\"color\":\"#e67704\"}]"} \ No newline at end of file diff --git a/be/app/projects/项目/config.json b/be/app/projects/项目/config.json deleted file mode 100644 index 95397cf..0000000 --- a/be/app/projects/项目/config.json +++ /dev/null @@ -1 +0,0 @@ -{"projectName": "项目", "projectType": "nlp 标注", "entityTypes": ""} \ No newline at end of file