generated_from_trainer

<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->

lsg-ner-phrases-16384

This model is a fine-tuned version of lsg-base-16384-juri on the cassandra-themis/ner-phrases dataset. It achieves the following results on the evaluation set:

Usage

from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
import re

model_path = "cassandra-themis/lsg-ner-phrases-16384"

model = AutoModelForTokenClassification.from_pretrained(model_path, trust_remote_code=True, use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained(model_path, use_auth_token=True)
ner_pipe = pipeline("token-classification", model=model, tokenizer=tokenizer)


document = "My document"
document_flattened = re.sub(r'(\s|\t|\n)+', r' ', document).strip()

prediction = ner_pipe(document_flattened, aggregation_strategy="simple")

sentences = []
for i in range(len(prediction) - 1):
    sentences.append(document_flattened[prediction[i]["start"]:prediction[i+1]["start"]].strip())
print("\n".join(sentences))

Model description

More information needed

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

Training results

Framework versions