Skip to content

Commit

Permalink
Improve accuracy for 札幌市
Browse files Browse the repository at this point in the history
  • Loading branch information
maskatsum committed Oct 16, 2024
1 parent 911602f commit 80d5540
Show file tree
Hide file tree
Showing 23 changed files with 1,080 additions and 184 deletions.
88 changes: 46 additions & 42 deletions e2e/__tests__/geocode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,48 +104,48 @@ const jsonTestRunner = async (testCaseName: string) => {
expect(JSON.parse(stdout)).toMatchObject(expectedOutput);
}

describe('debug', () => {

test('茨城県龍ケ崎市久保台2-3 久保台小学校', async () => {
const input = '茨城県龍ケ崎市久保台2-3 久保台小学校';
const { stdout } = await runGeocoder(OutputFormat.NDJSON, {
input,
});
expect(JSON.parse(stdout)).toMatchObject({
"query": {
"input": "茨城県龍ケ崎市久保台2-3 久保台小学校"
},
"result": {
"output": "茨城県龍ケ崎市久保台二丁目3 久保台小学校",
"others": ["久保台小学校"],
"match_level": "residential_block",
"coordinate_level": "residential_block",
"lat": 35.933121,
"lon": 140.177146,
"lg_code": "082082",
"machiaza_id": "0017002",
"rsdt_addr_flg": 1,
"blk_id": "003",
"rsdt_id": null,
"rsdt2_id": null,
"prc_id": null,
"pref": "茨城県",
"county": null,
"city": "龍ケ崎市",
"ward": null,
"oaza_cho": "久保台",
"chome": "二丁目",
"koaza": null,
"blk_num": "3",
"rsdt_num": null,
"rsdt_num2": null,
"prc_num1": null,
"prc_num2": null,
"prc_num3": null
}
});
});
});
// describe('debug', () => {

// test('茨城県龍ケ崎市久保台2-3 久保台小学校', async () => {
// const input = '茨城県龍ケ崎市久保台2-3 久保台小学校';
// const { stdout } = await runGeocoder(OutputFormat.NDJSON, {
// input,
// });
// expect(JSON.parse(stdout)).toMatchObject({
// "query": {
// "input": "茨城県龍ケ崎市久保台2-3 久保台小学校"
// },
// "result": {
// "output": "茨城県龍ケ崎市久保台二丁目3 久保台小学校",
// "others": ["久保台小学校"],
// "match_level": "residential_block",
// "coordinate_level": "residential_block",
// "lat": 35.933121,
// "lon": 140.177146,
// "lg_code": "082082",
// "machiaza_id": "0017002",
// "rsdt_addr_flg": 1,
// "blk_id": "003",
// "rsdt_id": null,
// "rsdt2_id": null,
// "prc_id": null,
// "pref": "茨城県",
// "county": null,
// "city": "龍ケ崎市",
// "ward": null,
// "oaza_cho": "久保台",
// "chome": "二丁目",
// "koaza": null,
// "blk_num": "3",
// "rsdt_num": null,
// "rsdt_num2": null,
// "prc_num1": null,
// "prc_num2": null,
// "prc_num3": null
// }
// });
// });
// });

describe('General cases', () => {
test('基本的なケースのテスト', async () => {
Expand All @@ -163,6 +163,10 @@ describe('General cases', () => {
test('京都通り名のテスト(2)', async () => {
await jsonTestRunner('kyoto-schools');
});

test('北海道札幌市のテスト', async () => {
await jsonTestRunner('sapporo-schools');
});
test('標準入力からのテスト', async () => {
const input = '東京都千代田区紀尾井町1-3 デジタル庁';
const { stdout } = await runGeocoder(OutputFormat.JSON, {
Expand Down
Loading

0 comments on commit 80d5540

Please sign in to comment.