Downloads · 30 days
696
2% of all-time downloads
cjber/reddit-ner-place_names
reddit-ner-place_names is a token classification model from cjber. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as mit.
Fine-tuned bert-base-uncased for named entity recognition, trained using wnut17 with 498 additional comments from Reddit. This model is intended solely for place name extraction from social media text, other entities…
Downloads · 30 days
696
2% of all-time downloads
All-time downloads
42.8K
Public
Parameters
109M
4.2 GB on disk
Likes
8
Public
Click a slice to open those files.
.bin436 MB · 50%
How the weights are stored.
F32109M · 100%
From the Hugging Face model README
Fine-tuned bert-base-uncased for named entity recognition, trained using wnut_17 with 498 additional comments from Reddit. This model is intended solely for place name extraction from social media text, other entities have therefore been removed.
This model was created with two key goals:
For the model code please see the following Model GitHub Repository.
In theory this model should be able to detect and ignore metonyms. For example in the sentence:
Manchester played Liverpool last night in Liverpool.
Both Manchester and the first Liverpool mention refer to football teams, therefore the model outputs:
[
{
"entity_group": "location",
"score": 0.9975672,
"word": "liverpool",
"start": 42,
"end": 51,
}
]
transformersfrom transformers import pipeline
generator = pipeline(
task="ner",
model="cjber/reddit-ner-place_names",
tokenizer="cjber/reddit-ner-place_names",
aggregation_strategy="first",
)
out = generator("I like reading books. I live in Reading.")
out gives:
[
{
"entity_group": "location",
"score": 0.94123614,
"word": "reading",
"start": 32,
"end": 39,
}
]