YAML Metadata Error: "datasets[0]" with value "Ultra Fine Entity Typing" is not valid. If possible, use a dataset id from https://hf.co/datasets.

City-Country-NER

A bert-base-uncased model finetuned on a custom dataset to detect Country and City names from a given sentence.

Custom Dataset

We weakly supervised the Ultra-Fine Entity Typing dataset to include the City and Country information. We also did some extra preprocessing to remove false labels.

The model predicts 3 different tags: OTHER, CITY and COUNTRY

How to use the finetuned model?

from transformers import AutoTokenizer, AutoModelForTokenClassification

tokenizer = AutoTokenizer.from_pretrained("ml6team/bert-base-uncased-city-country-ner")

model = AutoModelForTokenClassification.from_pretrained("ml6team/bert-base-uncased-city-country-ner")

from transformers import pipeline

nlp = pipeline('ner', model=model, tokenizer=tokenizer, aggregation_strategy="simple")
nlp("My name is Kermit and I live in London.")
Downloads last month
728
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for ml6team/bert-base-uncased-city-country-ner

Quantizations
1 model

Spaces using ml6team/bert-base-uncased-city-country-ner 2