japanese_address_parser 3.0.5 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -2
  3. data/Gemfile.lock +5 -5
  4. data/js/node_modules/.package-lock.json +86 -1
  5. data/js/node_modules/@geolonia/normalize-japanese-addresses/dist/main-browser.js +20 -7
  6. data/js/node_modules/@geolonia/normalize-japanese-addresses/dist/main-es.d.ts +3 -0
  7. data/js/node_modules/@geolonia/normalize-japanese-addresses/dist/main-es.js +1819 -0
  8. data/js/node_modules/@geolonia/normalize-japanese-addresses/dist/main-node.js +21 -8
  9. data/js/node_modules/@geolonia/normalize-japanese-addresses/dist/normalize.d.ts +1 -1
  10. data/js/node_modules/@geolonia/normalize-japanese-addresses/package.json +7 -4
  11. data/js/node_modules/@geolonia/normalize-japanese-addresses/rollup.config.ts +9 -0
  12. data/js/node_modules/@geolonia/normalize-japanese-addresses/src/lib/cacheRegexes.ts +16 -2
  13. data/js/node_modules/@geolonia/normalize-japanese-addresses/src/lib/dict.ts +3 -2
  14. data/js/node_modules/@geolonia/normalize-japanese-addresses/src/main-es.ts +4 -0
  15. data/js/node_modules/@geolonia/normalize-japanese-addresses/src/main-node.ts +1 -1
  16. data/js/node_modules/@geolonia/normalize-japanese-addresses/src/normalize.ts +2 -2
  17. data/js/package-lock.json +7 -7
  18. data/js/package.json +1 -1
  19. data/lib/japanese_address_parser/data/03-03206.csv +1 -0
  20. data/lib/japanese_address_parser/data/04-04421.csv +8 -8
  21. data/lib/japanese_address_parser/data/05-05203.csv +5 -0
  22. data/lib/japanese_address_parser/data/08-08222.csv +4 -0
  23. data/lib/japanese_address_parser/data/11-11442.csv +2 -0
  24. data/lib/japanese_address_parser/data/13-13225.csv +3 -0
  25. data/lib/japanese_address_parser/data/14-14134.csv +3 -0
  26. data/lib/japanese_address_parser/data/15-15104.csv +1 -1
  27. data/lib/japanese_address_parser/data/15-15222.csv +1 -1
  28. data/lib/japanese_address_parser/data/15-15225.csv +1 -1
  29. data/lib/japanese_address_parser/data/18-18202.csv +1 -1
  30. data/lib/japanese_address_parser/data/22-22102.csv +6 -0
  31. data/lib/japanese_address_parser/data/23-23202.csv +1 -0
  32. data/lib/japanese_address_parser/data/23-23207.csv +5 -0
  33. data/lib/japanese_address_parser/data/23-23213.csv +1 -0
  34. data/lib/japanese_address_parser/data/23-23236.csv +1 -0
  35. data/lib/japanese_address_parser/data/25-25206.csv +4 -0
  36. data/lib/japanese_address_parser/data/27-27212.csv +4 -0
  37. data/lib/japanese_address_parser/data/28-28108.csv +1 -0
  38. data/lib/japanese_address_parser/data/28-28204.csv +1 -1
  39. data/lib/japanese_address_parser/data/28-28226.csv +1 -0
  40. data/lib/japanese_address_parser/data/29-29201.csv +1 -1
  41. data/lib/japanese_address_parser/data/34-34207.csv +3 -0
  42. data/lib/japanese_address_parser/data/35-35215.csv +3 -0
  43. data/lib/japanese_address_parser/data/38-38204.csv +17 -0
  44. data/lib/japanese_address_parser/data/40-40131.csv +1 -0
  45. data/lib/japanese_address_parser/data/40-40342.csv +4 -0
  46. data/lib/japanese_address_parser/data/44-44201.csv +27 -0
  47. data/lib/japanese_address_parser/data/46-46201.csv +4 -0
  48. data/lib/japanese_address_parser/data/47-47205.csv +4 -0
  49. data/lib/japanese_address_parser/version.rb +1 -1
  50. metadata +6 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d28fd38a1eb9e6e7c3a6a8898bc94d22362d37682c484054f2590008a2323c1f
4
- data.tar.gz: 8eee70a4afd90a33efba50d1e58a5598df1fe6f08dcb172cab0091aedf2df0c3
3
+ metadata.gz: c6eb9e4ea89bdffa891da4f3854646b82b78e4d9e94965fe537227a1f0705361
4
+ data.tar.gz: 7bd4611b889b08db8673fdf0f0d12aa80c5f3eb9eb74e34017e3d51923f14b3b
5
5
  SHA512:
6
- metadata.gz: a8619ac4af9c11b814e4dd745445f783a6aadbda4bf0ab1c455015dcee0ce2091099a2a8c7ac6dcc645058bc20cfc25cf5f4bf680a4e713c9e4a566420485f84
7
- data.tar.gz: 646b35be9a561c4ba8e4429e4d83ab06dfe461e5752a2ff9851dd5fea78cca2df511c484b6c758ca18b1be0b6c3419c66b73a7cb19341eba13db4768eb0d1bab
6
+ metadata.gz: f63cdb14a5a9bd9de00ce62908f94cfb749043aa5f16e5c8bef464f5900708f9c123e02fb2118b02b99ca916e2fcf901435d13af1a467e9fb93ea216aad1634e
7
+ data.tar.gz: c6b74305c0445243169db577bd48150ca88f04ff8b4855af588924d7fc9fa0d63cc570da9661db7828002c383d21b94c45fac186c48ebc04d9b15c351e475530
data/CHANGELOG.md CHANGED
@@ -9,8 +9,6 @@ Change Log の形式は [Keep a Changelog](http://keepachangelog.com/) に従い
9
9
 
10
10
  ### Changed
11
11
 
12
- - [#79](https://github.com/yamat47/japanese_address_parser/pull/79) Bump activesupport from 7.0.4 to 7.0.4.1([@yamat47](https://github.com/yamat47))
13
-
14
12
  ### Deprecated
15
13
 
16
14
  ### Removed
@@ -19,6 +17,18 @@ Change Log の形式は [Keep a Changelog](http://keepachangelog.com/) に従い
19
17
 
20
18
  ### Security
21
19
 
20
+ ## [3.1.0] - 2023-07-24
21
+
22
+ ### Changed
23
+
24
+ - [#79](https://github.com/yamat47/japanese_address_parser/pull/79) Bump activesupport from 7.0.4 to 7.0.4.1([@yamat47](https://github.com/yamat47))
25
+ - [#84](https://github.com/yamat47/japanese_address_parser/pull/84) Bump activesupport from 7.0.4.1 to 7.0.4.3([@yamat47](https://github.com/yamat47))
26
+ - [#85](https://github.com/yamat47/japanese_address_parser/pull/85) CIに必要な権限を追加した。([@yamat47](https://github.com/yamat47))
27
+
28
+ ### Removed
29
+
30
+ - [#89](https://github.com/yamat47/japanese_address_parser/pull/89) 最新のRubyでCIを実行するのを一時的に停止した。([@yamat47](https://github.com/yamat47))
31
+
22
32
  ## [3.0.5]
23
33
  ### Changed
24
34
 
data/Gemfile.lock CHANGED
@@ -1,19 +1,19 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- japanese_address_parser (3.0.5)
4
+ japanese_address_parser (3.1.0)
5
5
  schmooze
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (7.0.4.1)
10
+ activesupport (7.0.4.3)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
12
  i18n (>= 1.6, < 2)
13
13
  minitest (>= 5.1)
14
14
  tzinfo (~> 2.0)
15
15
  ast (2.4.2)
16
- concurrent-ruby (1.1.10)
16
+ concurrent-ruby (1.2.2)
17
17
  diff-lcs (1.5.0)
18
18
  factory_bot (6.2.1)
19
19
  activesupport (>= 5.0.0)
@@ -25,7 +25,7 @@ GEM
25
25
  listen (3.7.1)
26
26
  rb-fsevent (~> 0.10, >= 0.10.3)
27
27
  rb-inotify (~> 0.9, >= 0.9.10)
28
- minitest (5.17.0)
28
+ minitest (5.18.0)
29
29
  parallel (1.22.1)
30
30
  parser (3.1.2.1)
31
31
  ast (~> 2.4.1)
@@ -81,7 +81,7 @@ GEM
81
81
  unicode-display_width (>= 1.1.1, < 3)
82
82
  typeprof (0.21.3)
83
83
  rbs (>= 1.8.1)
84
- tzinfo (2.0.5)
84
+ tzinfo (2.0.6)
85
85
  concurrent-ruby (~> 1.0)
86
86
  unicode-display_width (2.3.0)
87
87
 
@@ -1,5 +1,90 @@
1
1
  {
2
+ "name": "japanese_address_parser",
2
3
  "lockfileVersion": 3,
3
4
  "requires": true,
4
- "packages": {}
5
+ "packages": {
6
+ "node_modules/@geolonia/japanese-numeral": {
7
+ "version": "0.1.16",
8
+ "resolved": "https://registry.npmjs.org/@geolonia/japanese-numeral/-/japanese-numeral-0.1.16.tgz",
9
+ "integrity": "sha512-xzSsIHhyyjqNpW8qSh5bFMu3FJvyJGBbNZ/t8clPHkigjUdZ7Ck8wkzCkcwlVd00RkoHwGDLnvXx5W0WiGK0TQ=="
10
+ },
11
+ "node_modules/@geolonia/normalize-japanese-addresses": {
12
+ "version": "2.8.0",
13
+ "resolved": "https://registry.npmjs.org/@geolonia/normalize-japanese-addresses/-/normalize-japanese-addresses-2.8.0.tgz",
14
+ "integrity": "sha512-BNKTl+38nq+ZKABa9nmwixLyDTXDPYDWSG3DluTjvhog3LEVWcTOHy0taIWXpumlvoz67ingq2qxdjtvW8ktzQ==",
15
+ "dependencies": {
16
+ "@geolonia/japanese-numeral": "^0.1.16",
17
+ "isomorphic-unfetch": "^3.1.0",
18
+ "lru-cache": "^6.0.0"
19
+ }
20
+ },
21
+ "node_modules/isomorphic-unfetch": {
22
+ "version": "3.1.0",
23
+ "resolved": "https://registry.npmjs.org/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz",
24
+ "integrity": "sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q==",
25
+ "dependencies": {
26
+ "node-fetch": "^2.6.1",
27
+ "unfetch": "^4.2.0"
28
+ }
29
+ },
30
+ "node_modules/lru-cache": {
31
+ "version": "6.0.0",
32
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
33
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
34
+ "dependencies": {
35
+ "yallist": "^4.0.0"
36
+ },
37
+ "engines": {
38
+ "node": ">=10"
39
+ }
40
+ },
41
+ "node_modules/node-fetch": {
42
+ "version": "2.6.7",
43
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
44
+ "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
45
+ "dependencies": {
46
+ "whatwg-url": "^5.0.0"
47
+ },
48
+ "engines": {
49
+ "node": "4.x || >=6.0.0"
50
+ },
51
+ "peerDependencies": {
52
+ "encoding": "^0.1.0"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "encoding": {
56
+ "optional": true
57
+ }
58
+ }
59
+ },
60
+ "node_modules/tr46": {
61
+ "version": "0.0.3",
62
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
63
+ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
64
+ },
65
+ "node_modules/unfetch": {
66
+ "version": "4.2.0",
67
+ "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-4.2.0.tgz",
68
+ "integrity": "sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA=="
69
+ },
70
+ "node_modules/webidl-conversions": {
71
+ "version": "3.0.1",
72
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
73
+ "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
74
+ },
75
+ "node_modules/whatwg-url": {
76
+ "version": "5.0.0",
77
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
78
+ "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
79
+ "dependencies": {
80
+ "tr46": "~0.0.3",
81
+ "webidl-conversions": "^3.0.0"
82
+ }
83
+ },
84
+ "node_modules/yallist": {
85
+ "version": "4.0.0",
86
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
87
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
88
+ }
89
+ }
5
90
  }
@@ -402,8 +402,8 @@
402
402
  };
403
403
 
404
404
  // JIS 第2水準 => 第1水準 及び 旧字体 => 新字体
405
- var JIS_OLD_KANJI = '亞,圍,壹,榮,驛,應,櫻,假,會,懷,覺,樂,陷,歡,氣,戲,據,挾,區,徑,溪,輕,藝,儉,圈,權,嚴,恆,國,齋,雜,蠶,殘,兒,實,釋,從,縱,敍,燒,條,剩,壤,釀,眞,盡,醉,髓,聲,竊,淺,錢,禪,爭,插,騷,屬,對,滯,擇,單,斷,癡,鑄,敕,鐵,傳,黨,鬪,屆,腦,廢,發,蠻,拂,邊,瓣,寶,沒,滿,藥,餘,樣,亂,兩,禮,靈,爐,灣,惡,醫,飮,營,圓,歐,奧,價,繪,擴,學,罐,勸,觀,歸,犧,擧,狹,驅,莖,經,繼,缺,劍,檢,顯,廣,鑛,碎,劑,參,慘,絲,辭,舍,壽,澁,肅,將,證,乘,疊,孃,觸,寢,圖,穗,樞,齊,攝,戰,潛,雙,莊,裝,藏,續,體,臺,澤,膽,彈,蟲,廳,鎭,點,燈,盜,獨,貳,霸,賣,髮,祕,佛,變,辯,豐,飜,默,與,譽,謠,覽,獵,勵,齡,勞,壓,爲,隱,衞,鹽,毆,穩,畫,壞,殼,嶽,卷,關,顏,僞,舊,峽,曉,勳,惠,螢,鷄,縣,險,獻,驗,效,號,濟,册,棧,贊,齒,濕,寫,收,獸,處,稱,奬,淨,繩,讓,囑,愼,粹,隨,數,靜,專,踐,纖,壯,搜,總,臟,墮,帶,瀧,擔,團,遲,晝,聽,遞,轉,當,稻,讀,惱,拜,麥,拔,濱,竝,辨,舖,襃,萬,譯,豫,搖,來,龍,壘,隸,戀,樓,鰺,鶯,蠣,攪,竈,灌,諫,頸,礦,蘂,靱,賤,壺,礪,檮,濤,邇,蠅,檜,儘,藪,籠,彌'.split(/,/);
406
- var JIS_NEW_KANJI = '亜,囲,壱,栄,駅,応,桜,仮,会,懐,覚,楽,陥,歓,気,戯,拠,挟,区,径,渓,軽,芸,倹,圏,権,厳,恒,国,斎,雑,蚕,残,児,実,釈,従,縦,叙,焼,条,剰,壌,醸,真,尽,酔,髄,声,窃,浅,銭,禅,争,挿,騒,属,対,滞,択,単,断,痴,鋳,勅,鉄,伝,党,闘,届,脳,廃,発,蛮,払,辺,弁,宝,没,満,薬,余,様,乱,両,礼,霊,炉,湾,悪,医,飲,営,円,欧,奥,価,絵,拡,学,缶,勧,観,帰,犠,挙,狭,駆,茎,経,継,欠,剣,検,顕,広,鉱,砕,剤,参,惨,糸,辞,舎,寿,渋,粛,将,証,乗,畳,嬢,触,寝,図,穂,枢,斉,摂,戦,潜,双,荘,装,蔵,続,体,台,沢,胆,弾,虫,庁,鎮,点,灯,盗,独,弐,覇,売,髪,秘,仏,変,弁,豊,翻,黙,与,誉,謡,覧,猟,励,齢,労,圧,為,隠,衛,塩,殴,穏,画,壊,殻,岳,巻,関,顔,偽,旧,峡,暁,勲,恵,蛍,鶏,県,険,献,験,効,号,済,冊,桟,賛,歯,湿,写,収,獣,処,称,奨,浄,縄,譲,嘱,慎,粋,随,数,静,専,践,繊,壮,捜,総,臓,堕,帯,滝,担,団,遅,昼,聴,逓,転,当,稲,読,悩,拝,麦,抜,浜,並,弁,舗,褒,万,訳,予,揺,来,竜,塁,隷,恋,楼,鯵,鴬,蛎,撹,竃,潅,諌,頚,砿,蕊,靭,賎,壷,砺,梼,涛,迩,蝿,桧,侭,薮,篭,弥'.split(/,/);
405
+ var JIS_OLD_KANJI = '亞,圍,壹,榮,驛,應,櫻,假,會,懷,覺,樂,陷,歡,氣,戲,據,挾,區,徑,溪,輕,藝,儉,圈,權,嚴,恆,國,齋,雜,蠶,殘,兒,實,釋,從,縱,敍,燒,條,剩,壤,釀,眞,盡,醉,髓,聲,竊,淺,錢,禪,爭,插,騷,屬,對,滯,擇,單,斷,癡,鑄,敕,鐵,傳,黨,鬪,屆,腦,廢,發,蠻,拂,邊,瓣,寶,沒,滿,藥,餘,樣,亂,兩,禮,靈,爐,灣,惡,醫,飮,營,圓,歐,奧,價,繪,擴,學,罐,勸,觀,歸,犧,擧,狹,驅,莖,經,繼,缺,劍,檢,顯,廣,鑛,碎,劑,參,慘,絲,辭,舍,壽,澁,肅,將,證,乘,疊,孃,觸,寢,圖,穗,樞,齊,攝,戰,潛,雙,莊,裝,藏,續,體,臺,澤,膽,彈,蟲,廳,鎭,點,燈,盜,獨,貳,霸,賣,髮,祕,佛,變,辯,豐,飜,默,與,譽,謠,覽,獵,勵,齡,勞,壓,爲,隱,衞,鹽,毆,穩,畫,壞,殼,嶽,卷,關,顏,僞,舊,峽,曉,勳,惠,螢,鷄,縣,險,獻,驗,效,號,濟,册,棧,贊,齒,濕,寫,收,獸,處,稱,奬,淨,繩,讓,囑,愼,粹,隨,數,靜,專,踐,纖,壯,搜,總,臟,墮,帶,瀧,擔,團,遲,晝,聽,遞,轉,當,稻,讀,惱,拜,麥,拔,濱,竝,辨,舖,襃,萬,譯,豫,搖,來,龍,壘,隸,戀,樓,鰺,鶯,蠣,攪,竈,灌,諫,頸,礦,蘂,靱,賤,壺,礪,檮,濤,邇,蠅,檜,儘,藪,籠,彌,麩'.split(/,/);
406
+ var JIS_NEW_KANJI = '亜,囲,壱,栄,駅,応,桜,仮,会,懐,覚,楽,陥,歓,気,戯,拠,挟,区,径,渓,軽,芸,倹,圏,権,厳,恒,国,斎,雑,蚕,残,児,実,釈,従,縦,叙,焼,条,剰,壌,醸,真,尽,酔,髄,声,窃,浅,銭,禅,争,挿,騒,属,対,滞,択,単,断,痴,鋳,勅,鉄,伝,党,闘,届,脳,廃,発,蛮,払,辺,弁,宝,没,満,薬,余,様,乱,両,礼,霊,炉,湾,悪,医,飲,営,円,欧,奥,価,絵,拡,学,缶,勧,観,帰,犠,挙,狭,駆,茎,経,継,欠,剣,検,顕,広,鉱,砕,剤,参,惨,糸,辞,舎,寿,渋,粛,将,証,乗,畳,嬢,触,寝,図,穂,枢,斉,摂,戦,潜,双,荘,装,蔵,続,体,台,沢,胆,弾,虫,庁,鎮,点,灯,盗,独,弐,覇,売,髪,秘,仏,変,弁,豊,翻,黙,与,誉,謡,覧,猟,励,齢,労,圧,為,隠,衛,塩,殴,穏,画,壊,殻,岳,巻,関,顔,偽,旧,峡,暁,勲,恵,蛍,鶏,県,険,献,験,効,号,済,冊,桟,賛,歯,湿,写,収,獣,処,称,奨,浄,縄,譲,嘱,慎,粋,随,数,静,専,践,繊,壮,捜,総,臓,堕,帯,滝,担,団,遅,昼,聴,逓,転,当,稲,読,悩,拝,麦,抜,浜,並,弁,舗,褒,万,訳,予,揺,来,竜,塁,隷,恋,楼,鯵,鴬,蛎,撹,竃,潅,諌,頚,砿,蕊,靭,賎,壷,砺,梼,涛,迩,蝿,桧,侭,薮,篭,弥,麸'.split(/,/);
407
407
  var JIS_KANJI_REGEX_PATTERNS = JIS_OLD_KANJI.map(function (old, i) {
408
408
  var pattern = old + "|" + JIS_NEW_KANJI[i];
409
409
  return [pattern, old, JIS_NEW_KANJI[i]];
@@ -422,6 +422,7 @@
422
422
  _str = _str
423
423
  .replace(/三栄町|四谷三栄町/g, '(三栄町|四谷三栄町)')
424
424
  .replace(/鬮野川|くじ野川|くじの川/g, '(鬮野川|くじ野川|くじの川)')
425
+ .replace(/柿碕町|柿さき町/g, '(柿碕町|柿さき町)')
425
426
  .replace(/通り|とおり/g, '(通り|とおり)')
426
427
  .replace(/埠頭|ふ頭/g, '(埠頭|ふ頭)')
427
428
  .replace(/番町|番丁/g, '(番町|番丁)')
@@ -1376,9 +1377,9 @@
1376
1377
  return kanjiNumbers.length > 0;
1377
1378
  };
1378
1379
  var getTownRegexPatterns = function (pref, city) { return __awaiter(void 0, void 0, void 0, function () {
1379
- var cachedResult, pre_towns, townSet, towns, isKyoto, _i, pre_towns_1, town, originalTown, townAbbr, patterns;
1380
- return __generator(this, function (_a) {
1381
- switch (_a.label) {
1380
+ var cachedResult, pre_towns, townSet, towns, isKyoto, _i, pre_towns_1, town, originalTown, townAbbr, patterns, _a, towns_1, town, chomeMatch, chomeNamePart, chomeNum, pattern;
1381
+ return __generator(this, function (_b) {
1382
+ switch (_b.label) {
1382
1383
  case 0:
1383
1384
  cachedResult = cachedTownRegexes.get(pref + "-" + city);
1384
1385
  if (typeof cachedResult !== 'undefined') {
@@ -1386,7 +1387,7 @@
1386
1387
  }
1387
1388
  return [4 /*yield*/, getTowns(pref, city)];
1388
1389
  case 1:
1389
- pre_towns = _a.sent();
1390
+ pre_towns = _b.sent();
1390
1391
  townSet = new Set(pre_towns.map(function (town) { return town.town; }));
1391
1392
  towns = [];
1392
1393
  isKyoto = city.match(/^京都市/);
@@ -1452,6 +1453,18 @@
1452
1453
  }));
1453
1454
  return [town, pattern];
1454
1455
  });
1456
+ // X丁目の丁目なしの数字だけ許容するため、最後に数字だけ追加していく
1457
+ for (_a = 0, towns_1 = towns; _a < towns_1.length; _a++) {
1458
+ town = towns_1[_a];
1459
+ chomeMatch = town.town.match(/([^一二三四五六七八九十]+)([一二三四五六七八九十]+)(丁目?)/);
1460
+ if (!chomeMatch) {
1461
+ continue;
1462
+ }
1463
+ chomeNamePart = chomeMatch[1];
1464
+ chomeNum = chomeMatch[2];
1465
+ pattern = toRegexPattern("^" + chomeNamePart + "(" + chomeNum + "|" + kan2num(chomeNum) + ")");
1466
+ patterns.push([town, pattern]);
1467
+ }
1455
1468
  cachedTownRegexes.set(pref + "-" + city, patterns);
1456
1469
  return [2 /*return*/, patterns];
1457
1470
  }
@@ -1732,7 +1745,7 @@
1732
1745
  });
1733
1746
  })
1734
1747
  .replace(/(([0-9〇一二三四五六七八九十百千]+)(番地?)([0-9〇一二三四五六七八九十百千]+)号)\s*(.+)/, '$1 $5')
1735
- .replace(/([0-9〇一二三四五六七八九十百千]+)(番地?)([0-9〇一二三四五六七八九十百千]+)号?/, '$1-$3')
1748
+ .replace(/([0-9〇一二三四五六七八九十百千]+)\s*(番地?)\s*([0-9〇一二三四五六七八九十百千]+)\s*号?/, '$1-$3')
1736
1749
  .replace(/([0-9〇一二三四五六七八九十百千]+)番地?/, '$1')
1737
1750
  .replace(/([0-9〇一二三四五六七八九十百千]+)の/g, '$1-')
1738
1751
  .replace(/([0-9〇一二三四五六七八九十百千]+)[--﹣−‐⁃‑‒–—﹘―⎯⏤ーー─━]/g, function (match) {
@@ -0,0 +1,3 @@
1
+ import * as Normalize from './normalize';
2
+ export declare const config: Normalize.Config;
3
+ export declare const normalize: Normalize.Normalizer;