模型:
这是一个可以用于命名实体识别的模型。具体来说,这个SpanMarker模型使用 roberta-large 作为底层编码器。有关训练脚本,请参见train.py。
要使用此模型进行推断,请先安装span_marker库:
pip install span_marker
然后,您可以像这样运行模型推断:
from span_marker import SpanMarkerModel
# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("tomaarsen/span-marker-roberta-large-ontonotes5")
# Run inference
entities = model.predict("Amelia Earhart flew her single engine Lockheed Vega 5B across the Atlantic to Paris.")
有关此库的文档和其他信息,请参见 SpanMarker 存储库。