Downloads · 30 days
0
Berk/multilingual-place-extractor-mdeberta-13lang-v4
multilingual-place-extractor-mdeberta-13lang-v4 is a token classification model from Berk. 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 mDeBERTa-v3-base that tags place spans (CITY / COUNTRY / ENTITY, typed BIO) in travel text across 13 languages, plus a parameter-free linker + gazetteer that turns each span into a structured record {type,…
Downloads · 30 days
0
Access
Public
Updated May 25, 2026
Repo size
1.2 GB
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 90%
From the Hugging Face model README
Fine-tuned mDeBERTa-v3-base that tags place spans (CITY / COUNTRY / ENTITY, typed BIO)
in travel text across 13 languages, plus a parameter-free linker + gazetteer that turns
each span into a structured record {type, text, city, region, country, query}.
scripts/context_resolver.py) — for an ambiguous
city (a name in more than one country), it checks the other detected spans: a known landmark
(gazetteer/poi_country.json) or region naming exactly one candidate country pins the city
(e.g. "Iglesia de La Merced in Granada" -> Nicaragua). Pure dictionary lookups over the spans the
tagger already found - no extra model, no network. Off unless injected; the default stays
lightweight and browser-deployable.data_manifest.json records the exact training sources
(record counts + sha256 + git commit) so the corpus is reproducible and drift is detectable.import json
from infer_place_extractor import PlaceExtractor # scripts/
ext = PlaceExtractor("model",
region_names=set(json.load(open("gazetteer/region_names.json"))),
city_region=json.load(open("gazetteer/city_region.json")))
gaz = json.load(open("gazetteer/city_country_gazetteer.json"))["case_insensitive"]
gaz_multi = json.load(open("gazetteer/city_country_multi.json"))
for e in ext.extract("A week in Sicily, then Palermo and Catania", gaz, gazetteer_multi=gaz_multi):
print(e["type"], e["text"], "->", e["region"], e["country"])
The model alone (token classification) also loads with the standard transformers pipeline; the
gazetteer + scripts/ add the linking, region typing, enrichment, and the optional resolver.
model/ — DebertaV2ForTokenClassification (7 BIO tags) + tokenizer + bio_head.pt; model/onnx/
has fp32 + fp16 ONNX for transformers.js (verified equivalent to the PyTorch model).gazetteer/ — city_country_gazetteer.json (name->country), city_country_multi.json
(ambiguous names), region_names.json, city_region.json (city->admin-1 region),
poi_country.json (landmark->country, for the context resolver).scripts/ — infer_place_extractor.py, _gen_common.py, context_resolver.py.data_manifest.json — training-data provenance.Trained on public-data synthetic travel text generated from GeoNames (CC-BY) and Wikidata (CC0), balanced across the 13 languages with native scripts for the non-Latin ones. Released MIT.