我想将一些HTML文本转换为spaCy NER训练数据集。我要标记的实体在html中用$ ./assoc-array-tinkering.sh
Print all elements in the array...
ya1 - ya2 - ya3 - ya4
ye1 - ye2 - ye3 - ye4
yo1 - yo2 - yo3 - yo4
标签标记。例如,标记为<strong>
ORG
<strong>
我想将此文本转换为可接受的格式以进行空间训练。
<strong>Uber</strong> blew through $1 million
在python中有方便的方法吗?
答案 0 :(得分:0)
我认为您最好的选择是使用BeautifulSoup预处理文本,如下所述:
Python/BeautifulSoup - how to remove all tags from an element?