前言
原文地址:https://blog.csdn.net/m0_48742971/article/details/123241979
MarkupLM是微软最近开源的适用于网页信息抽取的深度学习模型。
代码:https://github.com/microsoft/unilm/
本文是针对数据预处理部分的源代码的学习笔记。
1. 主程序代码
def main(_):
if not os.path.exists(FLAGS.output_data_path):
os.makedirs(FLAGS.output_data_path)
args_list = []
vertical_to_websites_map = constants.VERTICAL_WEBSITES
verticals = vertical_to_websites_map.keys()
for vertical in verticals:
websites = vertical_to_websites_map[vertical]
for website in websites:
args_list.append((vertic