From fa9e56dbb2525854192eb7fbc8da204b97778d67 Mon Sep 17 00:00:00 2001 From: Xinyu Date: Tue, 15 Nov 2022 23:19:50 +0800 Subject: [PATCH] update --- docs/en/dataset_zoo.py | 5 ++++- docs/zh_cn/dataset_zoo.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/en/dataset_zoo.py b/docs/en/dataset_zoo.py index d0d28e3f0..733dc5cda 100755 --- a/docs/en/dataset_zoo.py +++ b/docs/en/dataset_zoo.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os import os.path as osp +import re import yaml @@ -18,12 +19,14 @@ meta = yaml.safe_load( open(osp.join(dataset_zoo_path, dataset, 'metafile.yml'))) dataset_name = meta['Name'] + detail_link = re.sub('[^A-Za-z0-9- ]', '', + dataset_name).replace(' ', '-').lower() paper = meta['Paper'] data = meta['Data'] table += '| [{}](#{}) | {} | {} | {} | {} |\n'.format( dataset, - dataset_name.lower().replace(' ', '-'), + detail_link, '✓' if 'textdet' in data['Tasks'] else '', '✓' if 'textrecog' in data['Tasks'] else '', '✓' if 'textspotting' in data['Tasks'] else '', diff --git a/docs/zh_cn/dataset_zoo.py b/docs/zh_cn/dataset_zoo.py index 96fc2a8b4..2d5f22604 100755 --- a/docs/zh_cn/dataset_zoo.py +++ b/docs/zh_cn/dataset_zoo.py @@ -1,6 +1,7 @@ #!/usr/bin/env python import os import os.path as osp +import re import yaml @@ -18,12 +19,14 @@ meta = yaml.safe_load( open(osp.join(dataset_zoo_path, dataset, 'metafile.yml'))) dataset_name = meta['Name'] + detail_link = re.sub('[^A-Za-z0-9- ]', '', + dataset_name).replace(' ', '-').lower() paper = meta['Paper'] data = meta['Data'] table += '| [{}](#{}) | {} | {} | {} | {} |\n'.format( dataset, - dataset_name.lower().replace(' ', '-'), + detail_link, '✓' if 'textdet' in data['Tasks'] else '', '✓' if 'textrecog' in data['Tasks'] else '', '✓' if 'textspotting' in data['Tasks'] else '',