Downloads · 30 days
5
2% of all-time downloads
apperry-ai/fact_extraction_roberta_crf
fact_extraction_roberta_crf is a token classification model from apperry-ai. Use it when you need labels on individual words, such as names. It is set up for transformers.
Downloads · 30 days
5
2% of all-time downloads
All-time downloads
314
Public
Repo size
993 MB
Likes
0
Public
Click a slice to open those files.
.bin496 MB · 99%
From the Hugging Face model README
[‘Family’, ‘Pet’, ‘Job’, ‘Likes’, ‘Dislikes’]
from tner import TransformersNER
model = TransformersNER("apperry-ai/fact_extraction_roberta")
output = model.predict(["My mom and dad is planning a big reunion next weekend"])
for entity in output['entity_prediction'][0]:
print(f"Type: {entity['type']}")
print(f"Entity: {', '.join(entity['entity'])}")
print(f"Position: {', '.join(map(str, entity['position']))}")
print(f"Probability: {', '.join(map(str, entity['probability']))}\n")