Downloads · 30 days
7
1% of all-time downloads
AhmedTaha012/Hadith-ner
Hadith-ner is a token classification model from AhmedTaha012. Use it when you need labels on individual words, such as names. It is set up for flair.
Downloads · 30 days
7
1% of all-time downloads
All-time downloads
1.2K
Public
Repo size
2.3 GB
Likes
0
Public
Click a slice to open those files.
.bin1.1 GB · 100%
From the Hugging Face model README
Requires:
pip install flair)from flair.data import Sentence
from flair.models import SequenceTagger
# load tagger
tagger = SequenceTagger.load("AhmedTaha012/Hadith-ner")
# make example sentence
sentence = Sentence("On September 1st George won 1 dollar while watching Game of Thrones.")
# predict NER tags
tagger.predict(sentence)
# print sentence
print(sentence)
# print predicted NER spans
print('The following NER tags are found:')
# iterate over entities and print
for entity in sentence.get_spans('ner'):
print(entity)