Downloads · 30 days
16
5% of all-time downloads
cassandra-themis/lsg-ner-phrases-16384
lsg-ner-phrases-16384 is a token classification model from cassandra-themis. Use it when you need labels on individual words, such as names. It is set up for transformers.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
16
5% of all-time downloads
All-time downloads
330
Public
Repo size
491 MB
Likes
0
Public
Click a slice to open those files.
.bin491 MB · 99%
From the Hugging Face model README
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:
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))
More information needed
More information needed
More information needed
The following hyperparameters were used during training: