加载中…
加载中…
This model is a fine-tuned version of roberta-base optimized to perform Named Entity Recognition (NER) / Token Classification on mathematical texts. Its primary objective is to detect inline and block LaTeX mathematical expressions within standard English text and classify them into their respective mathematical domains.
The model uses a BIO (Beginning, Inside, Outside) tagging schema across 4 distinct mathematical disciplines:
ALGEBRA (e.g., linear equations, polynomials, systems of equations)CALCULUS (e.g., integrals, derivatives, limits)GEOMETRY (e.g., shapes, coordinate planes, geometric theorems)TRIGONOMETRY (e.g., sine, cosine, identity equations){
"0": "O",
"1": "B-ALGEBRA", "2": "I-ALGEBRA",
"3": "B-CALCULUS", "4": "I-CALCULUS",
"5": "B-GEOMETRY", "6": "I-GEOMETRY",
"7": "B-TRIGONOMETRY", "8": "I-TRIGONOMETRY"
}
This model is intended for educational tools, math tutoring software, or documentation engines to help parse, analyze, or visually highlight mathematical syntax automatically.
The model was fine-tuned on 1,553 highly complex mathematical problems extracted from the lighteval/MATH-Hard dataset (specifically Level 5 competition-grade questions).
$...$, $$...$$, \[...\], \(...\)).char_to_token).You can run inference using the Hugging Face pipeline API:
from transformers import pipeline, AutoTokenizer, AutoModelForTokenClassification
model_id = "EricAI03/math_token_classification"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)
nlp_ner = pipeline("token-classification", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
text = "Find the derivative of \(\int x^2\) dx and then solve the linear equation \(y = 2x + 3\)."
print(nlp_ner(text))
FacebookAI/roberta-base