mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 11:24:00 +00:00
fix(voice): resolve areas per view, without accents and per natural place
From review:
- An answer the view picked ("Springfield" over Illinois) is reused or
shared only within the same ~2° view cell, so asking again elsewhere no
longer gets the first state's area.
- Admin names compare with accents folded on Latin letters only: "Quebec"
matches "Québec" and "Cordoba" asks between Argentina and Spain, while a
Thai or Devanagari mark still tells names apart.
- A Natural Earth name used by several features is one place with every
part when they touch (the Great Rift Valley, the Lau Group across 180°)
and a question when they are far apart (Flores); natural places can now
be candidates.
- The AREAS rule and the area tool descriptions are tighter, leaving a
~270-character margin under the 55,500 prompt ceiling, and resolve_area
no longer names osm_query when that tool is not offered.
This commit is contained in:
1 parent
fb74354d30
commit
207373389a
12 files changed
+328
-22
No files matched your search
@@ -412,6 +412,27 @@ test('a current Zone the source verified is not refused as retired', async () =>
|
||||
assert.equal(gamo.areas.store.size, 1);
|
||||
});
|
||||
|
||||
test('an outline named with accents is accepted for the same name spoken without them', async () => {
|
||||
const quebec = makeAreas({
|
||||
annotationResolver: fakeLadder({
|
||||
label: 'Québec',
|
||||
match: /quebec/i,
|
||||
outline: {
|
||||
ring: BAGMATI_POLYGONS[0][0],
|
||||
polygons: BAGMATI_POLYGONS,
|
||||
adminArea: 'Québec',
|
||||
adminLevel: 'admin1',
|
||||
synthesized: false,
|
||||
outlineSource: 'nominatim',
|
||||
},
|
||||
}),
|
||||
});
|
||||
const result = await quebec.areas.resolveAreaAction({
|
||||
query: 'Quebec province',
|
||||
});
|
||||
assert.equal(result.ok, true, result.error);
|
||||
});
|
||||
|
||||
test('a place no outline source can trace is refused, not guessed', async () => {
|
||||
const miss = makeAreas({
|
||||
annotationResolver: fakeLadder({ outline: null }),
|
||||
|
||||
Reference in new issue
Block a user