Views
No views yet
{type, text, city, region, country, query}.gazetteer/poi_resolver.json, ~33k notable POIs indexed over all their multilingual names) now
fills the geography when an ENTITY span has no governing city. Eiffel Tower → Eiffel Tower Paris France; Sagrada Familia → Sagrada Familia Barcelona Spain.프랑스 → France,
日本 → Japan).scripts/context_resolver.py) for ambiguous cities.data_manifest.json records the exact training sources
(record counts + sha256 + git commit).1import json
2from infer_place_extractor import PlaceExtractor # scripts/
3
4G = "gazetteer"
5ext = PlaceExtractor("model",
6 region_names=set(json.load(open(f"{G}/region_names.json"))),
7 city_region=json.load(open(f"{G}/city_region.json")),
8 poi_resolver=json.load(open(f"{G}/poi_resolver.json")), # NEW in v7
9 city_pop=json.load(open(f"{G}/city_population.json"))) # NEW in v7
10gaz = json.load(open(f"{G}/city_country_gazetteer.json"))["case_insensitive"]
11gaz_multi = json.load(open(f"{G}/city_country_multi.json"))
12for e in ext.extract("Eiffel Tower", gaz, gazetteer_multi=gaz_multi):
13 print(e["type"], e["text"], "->", e["query"]) # ENTITY Eiffel Tower -> Eiffel Tower Paris Francetransformers pipeline; the
gazetteer + scripts/ add the linking, region typing, enrichment, the POI resolver, and the
optional context 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), poi_resolver.json (landmark→city+country, NEW),
city_population.json (prominence guard for type-correction, NEW).scripts/ — infer_place_extractor.py, _gen_common.py, context_resolver.py.data_manifest.json — training-data provenance.