geolonia / normalize-japanese-addresses

オープンソースの住所正規化ライブラリ。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

normalization_failed が出る

ShinichiNishikawa opened this issue · comments

$ curl -v -G \
>   -H "x-access-token: xxx" \
>   --data-urlencode "q=山口県宇部市東岐波区815-6" \
>   --data-urlencode "api-key=xxx" \
>   "https://api.propid.jp/v1/"
*   Trying 18.65.148.120:443...
* Connected to api.propid.jp (18.65.148.120) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=propid.jp
*  start date: Mar 31 00:00:00 2021 GMT
*  expire date: Apr 29 23:59:59 2022 GMT
*  subjectAltName: host "api.propid.jp" matched cert's "*.propid.jp"
*  issuer: C=US; O=Amazon; OU=Server CA 1B; CN=Amazon
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x7feb8380d400)
> GET /v1/?q=%E5%B1%B1%E5%8F%A3%E7%9C%8C%E5%AE%87%E9%83%A8%E5%B8%82%E6%9D%B1%E5%B2%90%E6%B3%A2%E5%8C%BA815-6&api-key=25m20s30ylylq2utsrvz HTTP/2
> Host: api.propid.jp
> user-agent: curl/7.76.1
> accept: */*
> x-access-token: nw2zetabdms3f0ubixfr3z4sta8ydnz5
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 400
< content-type: application/json
< content-length: 129
< date: Sat, 19 Feb 2022 08:37:12 GMT
< x-amzn-requestid: 963b106f-f349-4fa4-8584-bcc31e3dbfee
< access-control-allow-origin: *
< x-ratelimit-reset: 2022-03-01T00:00:00.000+09:00
< access-control-allow-headers: x-access-token, authorization
< x-ratelimit-remaining: 9986
< x-amz-apigw-id: Nx_YjG4DNjMFfSA=
< cache-control: no-store, max-age=0
< x-ratelimit-limit: 10000
< x-amzn-trace-id: Root=1-6210ac36-4a15b65b79cc194349d65659;Sampled=0
< x-cache: Error from cloudfront
< via: 1.1 0326d10be6fb01c9a04ec6ae503b393c.cloudfront.net (CloudFront)
< x-amz-cf-pop: NRT51-P1
< x-amz-cf-id: wpS3eh6_M_zPaDNk_tXJQVjv9cxmfZ3_ZXzM1fVt1n4r7WwBDXm4GA==
<
* Connection #0 to host api.propid.jp left intact
{"error":true,"error_code":"normalization_failed","error_code_detail":"geo_oaza","address":"山口県宇部市東岐波区815-6"}

結果として、不動産共通IDのテストツールがこうなります↓

スクリーンショット 2022-02-19 17 31 20

@ShinichiNishikawa この件ですが、 addressPendingとしてマークされるようになっています。以下が正規化結果です。

[
  {
    "ID": "35-e793-a510-759c-0358",
    "normalization_level": "3",
    "address": {
      "ja": {
        "prefecture": "山口県",
        "city": "宇部市",
        "address1": "大字東岐波",
        "address2": "区815-6",
        "other": ""
      }
    },
    "geocoding_level": "3"
  }
]