Views
No views yet
{type, text, city, region, country, query}.gazetteer/poi_country.json,
~782 → ~11.4k unambiguous entries) — more ambiguous-city cases get disambiguated by a co-occurring
landmark, with no extra model and no network.scripts/context_resolver.py) — for an ambiguous
city, a co-occurring known landmark (gazetteer/poi_country.json) or region naming exactly one
candidate country pins it. 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).1import json
2from infer_place_extractor import PlaceExtractor # scripts/
3
4ext = PlaceExtractor("model",
5 region_names=set(json.load(open("gazetteer/region_names.json"))),
6 city_region=json.load(open("gazetteer/city_region.json")))
7gaz = json.load(open("gazetteer/city_country_gazetteer.json"))["case_insensitive"]
8gaz_multi = json.load(open("gazetteer/city_country_multi.json"))
9for e in ext.extract("Reykjavík, then Gullfoss and Geysir, then a week in Sicily",
10 gaz, gazetteer_multi=gaz_multi):
11 print(e["type"], e["text"], "->", e["region"], e["country"])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.