liyucheng/FrameNet_v17
Viewer • Updated • 28.4k • 162 • 2
How to use liyucheng/frame_finder with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("token-classification", model="liyucheng/frame_finder") # Load model directly
from transformers import AutoTokenizer, AutoModelForTokenClassification
tokenizer = AutoTokenizer.from_pretrained("liyucheng/frame_finder")
model = AutoModelForTokenClassification.from_pretrained("liyucheng/frame_finder")This model is trained FrameNet v1.7. Check out the training dataset here.
The data is loaded with ds = dataset.load_dataset('liyucheng/FrameNet_v17', name = 'frame_label').
This flatten all frame annotation to specific sentences, making frame classification a sequence tagging task.
{'accuracy_score': 0.8382018348623853, 'precision': 0.8382018348623853, 'recall': 0.8382018348623853, 'micro_f1': 0.8382018348623853, 'macro_f1': 0.45824850358482677}