Skip to content

Instantly share code, notes, and snippets.

@shavarani
shavarani / LUKE-CoNLL2003-Original-Code.py
Created January 13, 2025 05:58
LUKE CoNLL 2003 Original Code
"""
Evaluation script to evaluate the performance of the fine-tuned Luke model on the CoNLL-2003 dataset.
"""
import unicodedata
import torch
import conlleval
import logging
from transformers import AutoTokenizer, LukeForEntitySpanClassification
from tqdm import tqdm
@shavarani
shavarani / conll2003_luke_evaluation.py
Last active January 13, 2025 05:59
CoNLL 2003 LUKE Evaluation (Replicated)
"""
Evaluation script to evaluate the performance of the fine-tuned Luke model on the CoNLL-2003 dataset.
"""
import torch
import string
import conlleval
import logging
from transformers import AutoTokenizer, LukeForEntitySpanClassification
from datasets import load_dataset
from tqdm import tqdm