photon icon indicating copy to clipboard operation
photon copied to clipboard

add Japanese language support

Open JinIgarashi opened this issue 3 years ago • 27 comments

Let me create draft PR for adding Japanese language support because there still are some issues.

Installation for analysis-kuromoji and analysis-icu plugin

For Japanese language searching, we added analysis-kuromoji and andlysis-icu plugin for Elasticsearch v5.6.16.

However, there are no modules for both plugins in maven repository since v5.0.0-alpha5, so we have to install plugins manually by using mvn install.

The below is maven repo for plugins (not maintained now)

  • https://mvnrepository.com/artifact/org.elasticsearch.plugin/analysis-kuromoji
  • https://mvnrepository.com/artifact/org.elasticsearch.plugin/analysis-icu

The below is the link for official plugin modules.

  • https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-kuromoji/analysis-kuromoji-5.6.16.zip
  • https://artifacts.elastic.co/downloads/elasticsearch-plugins/analysis-icu/analysis-icu-5.6.16.zip

Before executing mvn package, we need to do the following commands to install plugins manually (I wrote it in README.md).

mvn install:install-file -Dfile=$(pwd)/es/modules/analysis-icu/analysis-icu-5.6.16.jar -DgroupId=org.elasticsearch.plugin -DartifactId=analysis-icu -Dversion=5.6.16 -Dpackaging=jar
mvn install:install-file -Dfile=$(pwd)/es/modules/analysis-kuromoji/analysis-kuromoji-5.6.16.jar -DgroupId=org.elasticsearch.plugin -DartifactId=analysis-kuromoji -Dversion=5.6.16 -Dpackaging=jar
mvn package

I am not very sure current installation procedure is the best, let me know if you have other idea...

analyzer for name

Another challenge of supporting Japanese language is default collector. We changed analyzer from current ones to kuromoji analyzers because the OSM put mixed languages into name.

The below is where we changed in mapping.json for default. https://github.com/MIERUNE/photon/blob/cfa0e417fa3c44890782cd0070efae98d12bb54a/es/mappings.json#L79-L92

This change of default mapping is working well at least for Japanese language searching, but I am worrying this might affect other multibyte languages searching like Chinese or Korea. Is there other way to resolve this issue?

JinIgarashi avatar Apr 13 '21 05:04 JinIgarashi

We found some searching result in English is different from original one. Current changes might affect other languages’ searching. Maybe it is because we changed analyzer for default collector. We are trying to enhance mapping for Japanese searching now.

JinIgarashi avatar May 10 '21 11:05 JinIgarashi

@lonvia Thank you for your advice! I am appreciate! In fact, I am now trying to enhance in this PR (https://github.com/MIERUNE/photon/pull/10).

I separated collector.default and collector.default_ja.

https://github.com/MIERUNE/photon/blob/17836000db3924d5a645f1c4b5112d94e24b19be/es/mappings.json#L80-L99

Then, I changed PhotonQueryBuilder to use different analyzer for default and ja.

https://github.com/MIERUNE/photon/blob/17836000db3924d5a645f1c4b5112d94e24b19be/src/main/java/de/komoot/photon/query/PhotonQueryBuilder.java#L56-L144

It improved some actually after above changes. But there are still some issues...

Today, I generated planet indices. You may try the below URL. I only produced indices for en and ja.

http://35.189.154.86:2322/api?q=%E6%9D%BE%E6%9C%AC&debug=true

I will also check your #580.

JinIgarashi avatar May 24 '21 10:05 JinIgarashi

@lonvia I merged ja_index_ngram and ja_search_ngram into original ngram. I think it works well for both Japanese and English.

Instead of adding collector.default_ja, I also added collector.default.raw_ja for Japanese language index.

{
    "default": {
        "type": "text",
        "analyzer": "index_ngram",
        "fields": {
            "raw": {
                "type": "text",
                "analyzer": "index_raw"
            },
            "raw_ja": {
                "type": "text",
                "analyzer": "ja_index_raw"
            }
        }
    }
}

Then, I changed PhotonQueryBuilder to use raw_ja when lang is ja.

Also, I tried to introduce some new query structure from your PR to ours.

Now, I am regenerating the planet index.

The latest working branch is this PR MIERUNE#10.

JinIgarashi avatar May 26 '21 07:05 JinIgarashi

That's great.

Next I would suggest that you consistently add the "search_analyser" to the mappings and then get rid of setting the analyser in the query builder. It should then automatically be using the one given in the mapping, so that you don't need the special case for Japanese language anymore. So, ideally you wouldn't need to modify the query building code at all in the end. If that works out, then the change is minimalistic enough that we can discuss about getting everything into the Photon master branch.

lonvia avatar May 26 '21 08:05 lonvia

@lonvia

you mean like this?

{
    "default": {
        "type": "text",
        "analyzer": "index_ngram",
        "fields": {
            "raw": {
                "type": "text",
                "analyzer": "index_raw",
                "search_analyzer": "search_raw"
            },
            "raw_ja": {
                "type": "text",
                "analyzer": "ja_index_raw",
                "search_analyzer": "ja_search_raw"
            }
        }
    }
}

In fact, I think it is necessary to add some source code in PhotonQueryBuilder. I added some raw searching for Japanese language here

https://github.com/MIERUNE/photon/blob/ceb85c8ca77efbbb474d1f57c3b11d814ba81d22/src/main/java/de/komoot/photon/query/PhotonQueryBuilder.java#L72-L142

Japanese language is a bit different from western language, it does not have any space to divide words. For instance,

成田空港(Narita airport)can be divided two words - 成田(narita) and 空港(airport).

It is not enough only to use edge_gram. We have to tokenize Japanese words with Kuromori analyzer. Maybe Chinese and Korean language are also similar.

JinIgarashi avatar May 26 '21 11:05 JinIgarashi

Yes, that's what I meant.

It is not enough only to use edge_gram. We have to tokenize Japanese words with Kuromori analyzer. Maybe Chinese and Korean language are also similar.

I was kind of expecting that the tokenizer automatically does the right thing for standard whitespace-separated scripts and thus can be used for all languages. I know that the ICU tokenizer works that way. If that is a wrong assumption, then we have indeed to resort to changing the query builder. The main issue is that the cross-language search won't work anymore because it depends on all collectors using the same analyser. But that might not be much of an issue with Japanese. You probably have our query either in Japanese or in a Latin script, not mixed.

lonvia avatar May 26 '21 14:05 lonvia

@lonvia I added search_analyzer to all of indices at mapping.json. Then I deleted search_raw from PhotonQueryBuilder.

I think cross_field query for raw indices does not affect for Japanese language searching. But I just simply changed to ja_search_raw if lang parameter is ja.

Also, I tried to introduce your code of PhotonQueryBuilder from #580, however, the below parts are not working well. So I deleted.

  • No.3 part https://github.com/lonvia/photon/blob/0b00fbdd8128b0f8135f62aea6f9552b708dbc37/src/main/java/de/komoot/photon/query/PhotonQueryBuilder.java#L98-L124
  • FunctionScore part https://github.com/lonvia/photon/blob/0b00fbdd8128b0f8135f62aea6f9552b708dbc37/src/main/java/de/komoot/photon/query/PhotonQueryBuilder.java#L131-L135

let me know if you have any suggestion

JinIgarashi avatar May 28 '21 06:05 JinIgarashi

@lonvia Planet index with this branch was now ready. You may try this URL (the server may stop anytime...). http://35.189.154.86:2322/api?q=%E6%9D%B1%E4%BA%AC&debug=true

However, there is some problem of searching in English when lang=ja is used. I think English words in name:ja affect badly. Japanese tokenizer does not seem working well for English words.

JinIgarashi avatar Jun 01 '21 07:06 JinIgarashi

I am trying to introduce analysis-sudachi analyzer. I think it has the latest dictionary and it might be better than kuromoji.

https://github.com/WorksApplications/elasticsearch-sudachi

JinIgarashi avatar Jun 03 '21 02:06 JinIgarashi

In fact, I think it is necessary to add some source code in PhotonQueryBuilder. I added some raw searching for Japanese language here

Checking the raw collector is already covered by point 2 in the query. I've changed it now from using CROSS_MATCH to using BEST_MATCH, which allows different analysers for the fields. So you only need to supply the Japanese index and search analyser for the collector.jp.raw field. Don't add an additional analyser for collector.default. It should not be necessary because the default names (i.e. content of the OSM name tag) in Japan will be assumed to be Japanese and appear in the collector.jp and name.jp field automatically.

Also, I tried to introduce your code of PhotonQueryBuilder from #580, however, the below parts are not working well. So I deleted. No.3 part

This part vastly improves search for addresses with housenumbers. There was a mistake in there to reject results not in the requested language. I've fixed that. It might have been your issue. If not, then I suspect that the issue here is more on the Nominatim side. It still doesn't handle Japanese block numbers correctly.

FunctionScore part

That's usually rather vital. It looks like you don't have imported your Nominatim database with Wikipedia importances. This is really important to get a decent result ranking.

I've updated #580 now a bit. Together with the latest changes on master it should be much easier to add another language. You now only need to add collector.jp and name.jp. They need to have the same ngrams fields as standard languages and the raw field with your special analysers. I'm still not completely happy with the scoring, so there with be some more changes. Do you have a set of test cases for Japanese searches? It would be helpful to have something in a different language.

lonvia avatar Jun 05 '21 13:06 lonvia

@lonvia Thanks a lot. I will apply the latest changes of master and #580 to our branch and test it.

It should not be necessary because the default names (i.e. content of the OSM name tag) in Japan will be assumed to be Japanese and appear in the collector.jp and name.jp field automatically.

First, let me check whether it can work without adding collector.default.raw_ja. However, I still think we need to add Japanese index for collector.default.raw because there are a lot of OSM features in Japan which only have name field without having name:ja. For instance, you may check the this nominatim URL.

It looks like you don't have imported your Nominatim database with Wikipedia importances. This is really important to get a decent result ranking.

Thanks!. I think our database has never imported Wikipedia importances. I was wondering the order of searching result in English between ours and original photon was a bit different. Maybe it is because there is no wikipedia information...

Do you have a set of test cases for Japanese searches? It would be helpful to have something in a different language.

Let me prepare some test query for Japanese searches.

JinIgarashi avatar Jun 07 '21 00:06 JinIgarashi

First, let me check whether it can work without adding collector.default.raw_ja. However, I still think we need to add Japanese index for collector.default.raw because there are a lot of OSM features in Japan which only have name field without having name:ja. For instance, you may check the this nominatim URL.

You are right. Nominatim doesn't add languages if there are no other translation. So this is something we should fix on the Photon side and create the localized name according to the country_code.

lonvia avatar Jun 07 '21 07:06 lonvia

@lonvia I merged from current master and #580 's PhotonQueryBuilder. Now it can work with No.3 and score parts. However, I added collector.default.raw_ja in mapping.json and some source code for Japanese language. I named cjk because I think Chinese and Korean are also similar.

Wikipedia importances are also working well. Our searching result became much better than before.

I am working on adding analysis-sudachi instead of Kuromoji in this PR https://github.com/MIERUNE/photon/pull/42

sudachi analyzer's dictionary is very powerful, I think Japanase language searches feature will complete after merging the above PR.

This part vastly improves search for addresses with housenumbers. There was a mistake in there to reject results not in the requested language. I've fixed that. It might have been your issue. If not, then I suspect that the issue here is more on the Nominatim side. It still doesn't handle Japanese block numbers correctly.

About house number issue, there is no house number information for OSM data in Japan. I think Japan's house number is so complicated. But your No.3 query is working well now.

JinIgarashi avatar Jun 08 '21 07:06 JinIgarashi

@lonvia I introduced analysis-sudachi, also put some description in README's building section.

sudachi is really great, the Japanese searches improved a lot. However, we have to include sudachi's dictionary inside es folder. Also, the size of dictionary is about 360MB. The jar size also increase a bit (about 20MB larger).

in PhotonQueryBuilder, I changed mainly three parts:

  1. Added phrase query after cross_field query when lang is ja. I used phrase because I want to search by meaningful word. For instance, 東京 means Tokyo, we must search by 東京's term. Not or or 京東.

https://github.com/MIERUNE/photon/blob/c95c70df43a520662301782f2bf0abc2fa76621c/src/main/java/de/komoot/photon/query/PhotonQueryBuilder.java#L107-L120

  1. I added raw search for ja after ngram filtering. I used operator for AND and fuzzy transposition for false. The reason used false fuzzy transposition is the same with no.1. For the reason of AND operator, I wanted to search the result which contains all of words matched. For example, if I search 東京 セブンイレブン(Tokyo/seven eleven), we need to get the result of seven eleven shops in Tokyo.

https://github.com/MIERUNE/photon/blob/c95c70df43a520662301782f2bf0abc2fa76621c/src/main/java/de/komoot/photon/query/PhotonQueryBuilder.java#L78-L92

3 Changed field to collector.default.raw_ja in no.2 query because we have to index name field by Japanese analyzer.

https://github.com/MIERUNE/photon/blob/c95c70df43a520662301782f2bf0abc2fa76621c/src/main/java/de/komoot/photon/query/PhotonQueryBuilder.java#L129-L131

Let me know if you have any idea or if I understand wrongly...

JinIgarashi avatar Jun 10 '21 06:06 JinIgarashi

  • added AND operator and fuzzyTransposition=false for No.4 query when lang=ja

It improved some. For instance,

search 鎌倉学園, before hits 鎌倉薫風学園 and 鎌倉パスタ. and 鎌倉パスタ is not related to school. now this code only hits 鎌倉薫風学園.

JinIgarashi avatar Jun 11 '21 05:06 JinIgarashi

  • introduced some synonyms to sudachi analyzer
  • added ja_index_ngram which uses mingram=2 and maxgram=100. For this purpose, I added collector.default.ngram_ja for Japanese language.

Having Japanese ngram index is very important, because most of Japanese words consists on two characters at minimum. For instance, 伊東(Ito city in Shizuoka prefecture)'s term will be queried by and separately with original ngram index_ngram. When we create an index with ja_index_ngram (mingram=2), it will be queried 伊東 correctly.

JinIgarashi avatar Jun 15 '21 02:06 JinIgarashi

@lonvia I reorganized PhotonQueryBuilder. I think now it is separated well from original query builder code...

JinIgarashi avatar Jun 18 '21 07:06 JinIgarashi

@lonvia The searching result in Japanese became much better after using ja_index_ngram (mingram=2, maxgram=100), however the size of planet index became so large (about 153GB) for en and ja. I think I need to look for another way to get the similar result without adding new ngram index for Japanese...

JinIgarashi avatar Jun 21 '21 00:06 JinIgarashi

My changes of https://github.com/MIERUNE/photon/pull/55:

  • Deleted ja_index_ngram because the size of planet index became so huge (about 153GB for en and ja only).
  • Changed target indices from collector.default and collector.ja.ngrams to collector.default.raw_ja and collector.ja.raw when Photon filter by using`search_ngram.

I think it works well especially the keyword with only two characters.

The size of index for Japanese country only is now around 2GB. before it was around 3GB when we used ja_index_ngram

JinIgarashi avatar Jun 23 '21 04:06 JinIgarashi

merged MIERUNE#56 in order to improve Japanese address searching.

Before add-japanese-support branch has a problem for Japanse address searching. For example, 神奈川県茅ヶ崎市 returns some random result which contains keyword of 茅ヶ崎 rather than returning place. 茅ヶ崎 can return the right result of Chigasaki city place.

JinIgarashi avatar Jun 29 '21 08:06 JinIgarashi

I re-organized PhotonQueryBuilder for Japanese. Also added matchPhrasePrefixQuery in order to boost the result by search-as-you-type. However, only 日本大学 query hits 日本大学会館 as first. There are still some problems(MIERUNE#58).

JinIgarashi avatar Jul 07 '21 06:07 JinIgarashi

added matchphrase query, and improved some result with MIERUNE#59. query 県立茅ヶ崎高等学校 returned 県立茅ヶ崎北陵高等学校 as top. now it can return 県立茅ヶ崎高等学校 correctly.

JinIgarashi avatar Jul 08 '21 05:07 JinIgarashi

In the PR MIERUNE#61, I changed PhotonQueryBulder as follows:

  • changed no.1 query for ja.
    • added rewrite parameter
    • make prefix_length become zero
    • make minimumShouldMatch become 3<-1
  • skip No.3 query for ja because ngram searching will reduce searching results
  • adjust No.4 query, we decided to use edge_ngram in no.4 query by using prefixQuery and ngram index.

Now, it can hit wide range results although there are still some problems. I found it is better to use edge_ngram after filtering raw analyzer, so I changed the query structure significantly. However, my changes will not affect other languages' searching.

JinIgarashi avatar Jul 13 '21 05:07 JinIgarashi

In the PR MIERUNE#62, I adjusted No.4 query in PhotonQueryBuilder, now it improved some Japanese word searching like 東京駅, 日光東照宮.

test queries results
{
  url: 'http://34.85.13.206/api/poi?q=narita%20airport&lang=ja',
  q: 'narita airport',
  result: '["Narita Airport Hostel(house,hostel,tourism,芝山町,千葉県,日本,289-1606)","成田国際空港(house,aerodrome,aeroway,成田市,千葉県,日本,282-0004)","成田空港(house,station,railway,成田市,千葉県,日本,282-0004)","空港第2ビル(house,station,railway,成田市,千葉県,日本,282-0004)","警察署(house,police,amenity,成田市,千葉県,日本,282-0004)","ヒルトン成田(house,hotel,tourism,成田市,千葉県,日本,286 0127)","成田空港空と大地の歴史館(house,museum,tourism,芝山町,千葉県,日本,289-1608)","成田東武ホテルエアポート(house,hotel,tourism,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,station,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港第一ターミナル(house,terminal,aeroway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=narita%20airport&lang=en',
  q: 'narita airport',
  result: '["Narita International Airport(house,aerodrome,aeroway,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Terminal 1(house,station,railway,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Terminal 2·3(house,station,railway,Narita,Chiba Prefecture,Japan,282-0004)","Hilton Tokyo Narita Airport(house,hotel,tourism,Narita,Chiba Prefecture,Japan,286 0127)","Narita International Airport Police Station(house,police,amenity,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport and Community Historical Museum(house,museum,tourism,Shibayama,Chiba Prefecture,Japan,289-1608)","Narita Airport Hostel(house,hostel,tourism,Shibayama,Chiba Prefecture,Japan,289-1606)","Narita Tobu Hotel Airport(house,hotel,tourism,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Terminal 1(house,stop,railway,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Terminal 1(house,station,railway,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Terminal 1(house,stop,railway,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Terminal 1(house,stop,railway,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Terminal 1(house,stop,railway,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Terminal 1(house,stop,railway,Narita,Chiba Prefecture,Japan,282-0004)","Narita Airport Resthouse(house,hotel,tourism,Narita,Chiba Prefecture,Japan,282-0004)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E6%88%90%E7%94%B0%E5%9B%BD%E9%9A%9B%E7%A9%BA%E6%B8%AF&lang=ja',
  q: '成田国際空港',
  result: '["成田国際空港(house,aerodrome,aeroway,成田市,千葉県,日本,282-0004)","警察署(house,police,amenity,成田市,千葉県,日本,282-0004)","成田空港(house,station,railway,成田市,千葉県,日本,282-0004)","成田国際空港株式会社(house,company,office,成田市,千葉県,日本,282-0004)","成田国際空港第2ターミナル(house,terminal,aeroway,成田市,千葉県,日本,282-0004)","成田国際空港郵便局(house,post_office,amenity,成田市,千葉県,日本,282-0004)","成田国際空港郵便局第1旅客ビル内分室(house,post_office,amenity,成田市,千葉県,日本,282-0004)","第2旅客ビル内分室(house,post_office,amenity,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,station,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港検疫所(house,public,building,成田市,千葉県,日本,282-0004)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E6%88%90%E7%94%B0%E7%A9%BA%E6%B8%AF&lang=ja',
  q: '成田空港',
  result: '["成田空港(house,station,railway,成田市,千葉県,日本,282-0004)","成田国際空港(house,aerodrome,aeroway,成田市,千葉県,日本,282-0004)","成田空港空と大地の歴史館(house,museum,tourism,芝山町,千葉県,日本,289-1608)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港(house,station,railway,成田市,千葉県,日本,282-0004)","成田空港(house,stop,railway,成田市,千葉県,日本,282-0004)","成田空港検疫所(house,public,building,成田市,千葉県,日本,282-0004)","ナインアワーズ 成田空港店(house,hotel,tourism,成田市,千葉県,日本,282-0004)","トヨタレンタカー 成田空港店(house,car_rental,amenity,成田市,千葉県,日本,282-0004)","成田空港第一ターミナル(house,terminal,aeroway,成田市,千葉県,日本,282-0004)","ニッポンレンタカー 成田空港(house,car_rental,amenity,成田市,千葉県,日本,282-0004)","イオンモール成田(house,mall,shop,成田市,千葉県,日本,286-0029)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=shizuoka&lang=ja',
  q: 'shizuoka',
  result: '["Rua Shizuoka(street,residential,highway,Cotia,Jardim Rosalina,サンパウロ,ブラジル,06716-520)","Rua Shizuoka(street,residential,highway,Diadema,Taboão,サンパウロ,ブラジル,09940-240)","Shizuoka BMW(house,car,shop,静岡市,駿河区,静岡県,日本,422-8550)","Shizuoka(house,restaurant,amenity,Sèvres,Les Bruyères,イル=ド=フランス,フランス,92310)","静岡SA(下り)大型P(house,parking,amenity,静岡市,葵区,静岡県,日本,420-8602)","静岡SA(上り)小型P(house,parking,amenity,静岡市,葵区,静岡県,日本,420-8602)","静岡SA(上り)大型P(house,parking,amenity,静岡市,葵区,静岡県,日本,420-8602)","静岡SA(下り)小型P(house,parking,amenity,静岡市,葵区,静岡県,日本,420-8602)","Shizuoka Shinbun Shizuoka Hōsō Biru(house,newspaper,office,東京都,中央区,日本,104-0061)","静岡市(city,city,place,静岡県,日本,420-8602)","Shizuoka University Library(house,library,amenity,静岡市,駿河区,静岡県,日本,422-8550)","静岡県(state,province,place,日本)","葵区(district,suburb,place,静岡市,静岡県,日本,420-8602)","静岡(house,stop,railway,静岡市,葵区,静岡県,日本,420-8602)","静岡(house,stop,railway,静岡市,葵区,静岡県,日本,420-8602)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=shizuoka&lang=en',
  q: 'shizuoka',
  result: '["Shizuoka(city,city,place,Shizuoka Prefecture,Japan,420-8602)","Shizuoka Prefecture(state,province,place,Japan)","Shizuoka(house,stop,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)","Shizuoka(house,stop,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)","Shizuoka(house,stop,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)","Shizuoka(house,station,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)","Shizuoka(house,stop,railway,Shizuoka,Suruga Ward,Shizuoka Prefecture,Japan,422-8550)","Shizuoka(house,station,railway,Shizuoka,Suruga Ward,Shizuoka Prefecture,Japan,422-8550)","Shizuoka(house,stop,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)","Shizuoka(house,stop,railway,Shizuoka,Suruga Ward,Shizuoka Prefecture,Japan,422-8550)","Shizuoka Stadium ECOPA(house,stadium,leisure,Fukuroi,Shizuoka Prefecture,Japan,436-0048)","Shin-shizuoka(house,stop,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)","Shin-shizuoka(house,station,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)","Higashi-Shizuoka(house,stop,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)","Shin-shizuoka(house,stop,railway,Shizuoka,Aoi Ward,Shizuoka Prefecture,Japan,420-8602)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E9%9D%99%E5%B2%A1&lang=ja',
  q: '静岡',
  result: '["静岡県(state,province,place,日本)","静岡市(city,city,place,静岡県,日本,420-8602)","静岡(house,stop,railway,静岡市,葵区,静岡県,日本,420-8602)","静岡(house,station,railway,静岡市,葵区,静岡県,日本,420-8602)","静岡(house,stop,railway,静岡市,葵区,静岡県,日本,420-8602)","静岡(house,stop,railway,静岡市,葵区,静岡県,日本,420-8602)","静岡(house,stop,railway,静岡市,葵区,静岡県,日本,420-8602)","静岡(house,stop,railway,静岡市,駿河区,静岡県,日本,422-8550)","静岡(house,station,railway,静岡市,駿河区,静岡県,日本,422-8550)","静岡(house,stop,railway,静岡市,駿河区,静岡県,日本,422-8550)","静岡英和学院大学(house,school,amenity,静岡市,駿河区,静岡県,日本,422-8550)","静岡IC(house,motorway_junction,highway,静岡市,駿河区,静岡県,日本,422-8550)","静岡文化芸術大学(house,university,amenity,浜松市,中区,静岡県,日本,430-0918)","静岡県立美術館(house,museum,tourism,静岡市,清水区,静岡県,日本,424-8701)","静岡競輪場(house,stadium,leisure,静岡市,駿河区,静岡県,日本,422-8550)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E9%9D%99%E5%B2%A1%E7%9C%8C&lang=ja',
  q: '静岡県',
  result: '["静岡県(state,province,place,日本)","静岡県柑橘試験場落葉果樹分場(locality,commercial,landuse,浜松市,北区,静岡県,日本)","静岡県立浜北西高等学校(house,school,amenity,浜松市,浜北区,静岡県,日本,434-0041)","静岡県企業局都田浄水場(locality,industrial,landuse,浜松市,北区,静岡県,日本)","伊豆山神社(house,place_of_worship,amenity,熱海市,静岡県,日本,413-0002)","静岡県警察 静岡南警察署(locality,public,landuse,日本,422-8550)","伊古奈比咩命神社(house,place_of_worship,amenity,下田市,静岡県,日本,415-8501)","私立静岡県西遠女子学園(house,school,amenity,浜松市,中区,静岡県,日本,430-0807)","静岡市(city,city,place,静岡県,日本,420-8602)","静岡県へようこそ(house,information,tourism,浜松市,西区,静岡県,日本,431-1209)","静岡県へようこそ(house,information,tourism,浜松市,西区,静岡県,日本,431-0211)","静岡県へようこそ(house,information,tourism,伊東市,静岡県,日本,〒413-0231)","静岡県へようこそ(house,information,tourism,浜松市,天竜区,静岡県,日本)","静岡県へようこそ(house,information,tourism,浜松市,西区,静岡県,日本,431-1206)","静岡県へようこそ(house,information,tourism,浜松市,西区,静岡県,日本,431-1209)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E6%9D%BE%E6%9C%AC&lang=ja',
  q: '松本',
  result: '["松本市(city,city,place,長野県,日本)","松本(house,station,railway,松本市,長野県,日本,3900874)","松本(house,station,railway,松本市,長野県,日本,3900874)","松本城(house,museum,tourism,松本市,葭町,長野県,日本,390-0874)","松本城(house,castle,historic,松本市,葭町,長野県,日本,390-0874)","松本大学(house,university,amenity,松本市,新村,長野県,日本,390-1701)","松本空港ターミナルビル(house,terminal,aeroway,松本市,空港東,長野県,日本,3990033)","松本(district,administrative,boundary,青森市,青森県,日本)","松本歯科大学(house,college,amenity,塩尻市,郷原,長野県,日本,399-6461)","松本市美術館(house,museum,tourism,松本市,長野県,日本,390−0815)","松本(locality,quarter,place,福井市,福井県,日本,910-0003)","松本IC(house,motorway_junction,highway,松本市,長野県,日本,390-0852)","松本(locality,quarter,place,沖縄市,沖縄県,日本,904-2155)","松本(locality,neighbourhood,place,球磨村,熊本県,日本)","松本奥川(locality,river,waterway,日本)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E5%93%81%E5%B7%9D%E9%A7%85&lang=ja',
  q: '品川駅',
  result: '["品川駅(house,train_station,building,東京都,品川,日本,108-0075)","品川駅港南商店街(locality,retail,landuse,東京都,品川,日本,108-0075)","品川駅東口(house,bus_stop,highway,東京都,品川,日本,108-0075)","品川駅港南口(house,bus_stop,highway,東京都,品川,日本,108-0075)","品川駅高輪口(house,bus_stop,highway,東京都,品川,日本,108-8611)","品川駅港南口交番(house,police,amenity,東京都,品川,日本,108-0075)","品川駅西口(高輪口)(house,bus_stop,highway,東京都,品川,日本,108-8611)","品川駅高輪口(house,bus_station,amenity,東京都,品川,日本,108-8611)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E6%9D%B1%E4%BA%AC&lang=ja',
  q: '東京',
  result: '["東京都(city,province,place,日本)","東京ドーム(house,stadium,leisure,東京都,文京区,日本,112-0004)","東京(house,station,railway,東京都,千代田区,日本,100-0005)","東京(house,station,railway,東京都,千代田区,日本,100-0005)","東京(house,station,railway,東京都,千代田区,日本,100-0005)","国立国会図書館・東京本館(house,library,amenity,東京都,千代田区,日本,102-0092)","東京湾(locality,bay,natural,日本)","東京国際空港(house,island,man_made,東京都,大田区,日本,144-0041)","東京国際空港(house,aerodrome,aeroway,東京都,大田区,日本,144-0041)","東京国際空港(locality,island,place,日本)","東京藝術大学(house,university,amenity,東京都,足立区,日本,120-0034)","東京競馬場(house,stadium,leisure,東京都,府中市,日本,183-0016)","東京急行電鉄(house,company,office,東京都,渋谷区,日本,150-8511)","東京農業大学(house,university,amenity,東京都,世田谷区,日本,156-0053)","東京タワー(house,attraction,tourism,東京都,麻布,日本,105-0011)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E6%9D%B1%E4%BA%AC%E9%A7%85&lang=ja',
  q: '東京駅',
  result: '["東京駅(house,bus_stop,highway,東京都,中央区,日本,103-0028)","東京駅(house,bus_stop,highway,東京都,中央区,日本,100-6633)","東京駅(house,bus_stop,highway,東京都,中央区,日本,103-8238)","東京駅南口(house,bus_stop,highway,東京都,千代田区,日本,100-0005)","東京駅中央口(house,traffic_signals,highway,東京都,千代田区,日本,100-0005)","東京駅南口(house,traffic_signals,highway,東京都,千代田区,日本,100-0005)","東京駅一番街(house,retail,building,東京都,神田,日本,100-0005)","SL 東京駅(house,station,railway,犬山市,愛知県,日本,485-0815)","東京駅 (京葉線)(house,subway_entrance,railway,東京都,千代田区,日本,100-0005)","東京駅丸の内南口(house,bus_stop,highway,東京都,千代田区,日本,100-0005)","東京駅丸の内北口(house,bus_stop,highway,東京都,千代田区,日本,100-0005)","東京駅 (京葉線)(house,subway_entrance,railway,東京都,千代田区,日本,100-0005)","東京駅八重洲口(house,bus_stop,highway,東京都,中央区,日本,100-6633)","東京駅八重洲口(house,bus_stop,highway,東京都,千代田区,日本,100-0005)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E7%94%A3%E6%A5%AD%E6%8C%AF%E8%88%88%E3%82%BB%E3%83%B3%E3%82%BF%E3%83%BC%20%E5%A4%A7%E9%98%AA&lang=ja',
  q: '産業振興センター 大阪',
  result: '["堺市産業振興センター イベントホール(house,theatre,amenity,堺市,東区,大阪府,日本,540-8570)","寝屋川市立産業振興センター(house,government,office,寝屋川市,大阪府,日本,572-0042)","堺市産業振興センター(じばしん南大阪)第2駐車場(house,parking,amenity,堺市,北区,大阪府,日本,540-8570)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E7%94%A3%E6%A5%AD%E6%8C%AF%E8%88%88%E3%82%BB%E3%83%B3%E3%82%BF%E3%83%BC&lang=ja',
  q: '産業振興センター',
  result: '["産業振興センター(house,stop,railway,横浜市,金沢区,神奈川県,日本,231-0017)","産業振興センター(house,station,railway,横浜市,金沢区,神奈川県,日本,231-0017)","産業振興センター(house,stop,railway,横浜市,金沢区,神奈川県,日本,231-0017)","産業振興センター(house,bus_stop,highway,横浜市,金沢区,神奈川県,日本,231-0017)","産業振興センター(house,community_centre,amenity,東京都,杉並区,日本,167-0051)","産業振興センター(house,company,office,札幌市,白石区,北海道,日本,003-0806)","産業振興センター前(house,bus_stop,highway,新潟市,中央区,新潟県,日本,950-0941)","産業振興センター前(house,traffic_signals,highway,横浜市,金沢区,神奈川県,日本,231-0017)","産業振興センター診療所(house,doctors,amenity,横浜市,金沢区,神奈川県,日本,231-0017)","新潟市産業振興センター(house,public,building,新潟市,中央区,新潟県,日本,950-0941)","堺市産業振興センター イベントホール(house,theatre,amenity,堺市,東区,大阪府,日本,540-8570)","旭川地場産業振興センター(house,yes,building,旭川市,神楽,北海道,日本,070-8004)","地域産業振興センター前(house,bus_stop,highway,加古川市,兵庫県,日本,675-0057)","名張産業振興センターASPIA(house,yes,office,名張市,三重県,日本,518-0492)","中野区産業振興センター(house,yes,building,東京都,中野区,日本,164-0001)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E4%BC%8A%E6%9D%B1%E5%B8%82%E9%8E%8C%E7%94%B0&lang=ja',
  q: '伊東市鎌田',
  result: '["伊東鎌田郵便局(house,post_office,amenity,伊東市,静岡県,日本,414-0022)","鎌田幼稚園(house,kindergarten,amenity,伊東市,静岡県,日本,414-0022)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E6%9D%B1%E4%BA%AC%E3%82%BF%E3%83%AF%E3%83%BC&lang=ja',
  q: '東京タワー',
  result: '["東京タワー(house,attraction,tourism,東京都,麻布,日本,105-0011)","東京タワー(house,tower,man_made,東京都,麻布,日本,105-0011)","東京タワー通り(street,tertiary,highway,東京都,麻布,日本,106-0041)","東京タワー通り(street,tertiary,highway,東京都,麻布,日本,105-0011)","東京タワー(house,bus_stop,highway,東京都,麻布,日本,105-0011)","東京タワー前(house,traffic_signals,highway,東京都,麻布,日本,105-0011)","愛宕警察署 東京タワー前交番(house,police,amenity,東京都,麻布,日本,105-0011)","東京タワー・ミニマート(house,convenience,shop,ヤンゴン,ပန်းဘဲတန်း,ヤンゴン,ミャンマー,11142)","御成門(house,station,railway,東京都,港区,日本,105-8799)","御成門(house,stop,railway,東京都,港区,日本,105-8799)","御成門(house,stop,railway,東京都,港区,日本,105-8799)","undefined(house,attraction,tourism,東京都,麻布,日本,105-0011)","テレビ東京(house,studio,amenity,東京都,麻布,日本,106-8107)","テレビ東京(house,company,office,東京都,麻布,日本,106-8107)","新国立劇場(house,assembly_point:unable_to_move=yes,emergency,東京都,新宿区,日本,151-0071)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E9%8E%8C%E5%80%89%E5%AD%A6%E5%9C%92&lang=ja',
  q: '鎌倉学園',
  result: '["鎌倉学園中・高等学校(house,school,amenity,鎌倉市,台,神奈川県,日本,247-0062)","県立鎌倉高等学校(house,school,amenity,鎌倉市,一丁目,神奈川県,日本,251-0035)","栄光学園(house,school,amenity,鎌倉市,四丁目,神奈川県,日本,247-0071)","私立鎌倉学園高等学校(house,school,amenity,鎌倉市,台,神奈川県,日本,247-0062)","愛国学園短期大学(house,college,amenity,東京都,葛飾区,日本,125-0053)","鎌倉市立玉縄小学校(house,school,amenity,鎌倉市,一丁目,神奈川県,日本,247-0072)","横浜国立大学附属横浜中学校(house,school,amenity,横浜市,南区,神奈川県,日本,231-0017)","県立鎌倉養護学校(house,school,amenity,鎌倉市,関谷,神奈川県,日本,244-0844)","私立清泉小学校(house,school,amenity,鎌倉市,三丁目,神奈川県,日本,248-8588)","前橋市立 鎌倉中学校(house,school,amenity,前橋市,群馬県,日本,371-0018)","県立深沢高等学校(house,school,amenity,鎌倉市,一丁目,神奈川県,日本,251-0015)","市立第一小学校(house,school,amenity,鎌倉市,二丁目,神奈川県,日本,248-0014)","富士見市立西中学校(house,school,amenity,三芳町,埼玉県,日本,354-0043)","神奈川県立柏陽高等学校(house,school,amenity,横浜市,栄区,神奈川県,日本,231-0017)","横浜市立横浜総合高等学校(house,school,amenity,横浜市,南区,神奈川県,日本,231-0017)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E4%BC%8A%E6%9D%B1%20%E3%82%B3%E3%83%B3%E3%83%93%E3%83%8B&lang=ja',
  q: '伊東 コンビニ',
  result: '["セブンイレブン 伊東湯川店(house,convenience,shop,伊東市,静岡県,日本,414-0002)","ファミリーマート(house,convenience,shop,伊東市,静岡県,日本,414-0022)","ローソン(house,convenience,shop,伊東市,静岡県,日本,414-0002)","ファミリーマート(house,convenience,shop,伊東市,静岡県,日本,414-0054)","ローソン(house,convenience,shop,伊東市,静岡県,日本,414-0022)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0002)","ミニストップ(house,convenience,shop,伊東市,静岡県,日本,414-0022)","ローソン(house,convenience,shop,伊東市,静岡県,日本,414-0022)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0002)","ローソン(house,convenience,shop,伊東市,静岡県,日本,414-0023)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0042)","ミニストップ(house,convenience,shop,伊東市,静岡県,日本,414-0051)","セブン-イレブン(house,convenience,shop,伊豆市,静岡県,日本,410-2407)","ローソン(house,convenience,shop,伊豆市,静岡県,日本,410-2501)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0028)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E4%BC%8A%E6%9D%B1%20%E6%B8%A9%E6%B3%89&lang=ja',
  q: '伊東 温泉',
  result: '["立ち寄り温泉;伊東高原の湯(house,parking,amenity,伊東市,静岡県,日本,413-0232)","立ち寄り温泉;伊東高原の湯(house,public_bath,amenity,伊東市,静岡県,日本,413-0232)","富戸温泉(house,public_bath,amenity,伊東市,静岡県,日本,414-0044)","湯ヶ島温泉(house,bus_stop,highway,伊豆市,静岡県,日本,410-3206)","持越温泉(house,bus_stop,highway,伊豆市,静岡県,日本,410-3206)","宇佐見温泉観光案内図(house,information,tourism,伊東市,静岡県,日本,414-0002)","温泉民宿 鈴幸(house,guest_house,tourism,伊東市,静岡県,日本,414-0002)","木太刀温泉(house,bus_stop,highway,伊豆市,静岡県,日本,410-3206)","小川温泉共同浴場(house,public_bath,amenity,伊豆市,静岡県,日本,410-2407)","中伊豆温泉病院(house,hospital,amenity,伊豆市,静岡県,日本,410-2407)","猪戸温泉通りの由来(house,artwork,tourism,伊東市,静岡県,日本,414-0022)","八幡野温泉郷きらの里(house,hotel,tourism,伊東市,静岡県,日本,413-0232)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=414-0054&lang=ja',
  q: '414-0054',
  result: '["城山(locality,peak,natural,日本,414-0054)","馬場平(locality,volcano,natural,日本,414-0054)","落合川(locality,river,waterway,日本,414-0054)","伊東大川(locality,river,waterway,日本,414-0054)","伊東大川(locality,river,waterway,日本,414-0054)","伊東大川(locality,river,waterway,日本,414-0054)","伊東大川(locality,river,waterway,日本,414-0054)","伊東大川(locality,river,waterway,日本,414-0054)","伊東大川(locality,river,waterway,日本,414-0054)","伊東大川(locality,river,waterway,日本,414-0054)","奥野ダム(locality,dam,waterway,日本,414-0054)","冷川峠(locality,yes,mountain_pass,日本,414-0054)","伊東西伊豆線(street,primary,highway,伊東市,静岡県,日本,414-0054)","伊東修善寺線(street,primary,highway,伊東市,静岡県,日本,414-0054)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E9%9D%99%E5%B2%A1%E7%9C%8C%E7%86%B1%E6%B5%B7%E5%B8%82%E7%94%B0%E5%8E%9F%E6%9C%AC%E7%94%BA&lang=ja',
  q: '静岡県熱海市田原本町',
  result: '["熱海(house,stop,railway,熱海市,静岡県,日本,413-0005)","熱海(house,stop,railway,熱海市,静岡県,日本,413-0005)","熱海(house,train_station,building,熱海市,静岡県,日本,413-0005)","熱海(house,station,railway,熱海市,静岡県,日本,413-0005)","熱海(house,stop,railway,熱海市,静岡県,日本,413-0005)","熱海(house,stop,railway,熱海市,静岡県,日本,413-0005)","熱海(house,stop,railway,熱海市,静岡県,日本,413-0005)","熱海(house,station,railway,熱海市,静岡県,日本,413-0005)","熱海(house,stop,railway,熱海市,静岡県,日本,413-0005)","熱海(house,stop,railway,熱海市,静岡県,日本,413-0005)","田原本町(locality,quarter,place,熱海市,静岡県,日本,413-0011)","MOA美術館(house,museum,tourism,熱海市,静岡県,日本,413-8511)","市立桃山小学校(house,school,amenity,熱海市,静岡県,日本,413-0011)","仲見世名店街(street,pedestrian,highway,熱海市,静岡県,日本,413-0011)","熱海停車場線(street,secondary,highway,熱海市,静岡県,日本,413-0005)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E7%A5%9E%E5%A5%88%E5%B7%9D%E7%9C%8C%E8%8C%85%E3%83%B6%E5%B4%8E%E5%B8%82&lang=ja',
  q: '神奈川県茅ヶ崎市',
  result: '["茅ヶ崎市(city,city,place,神奈川県,日本)","モリサイクル(house,motorcycle,shop,茅ヶ崎市,神奈川県,日本,235-0061)","茅ヶ崎(house,stop,railway,茅ヶ崎市,神奈川県,日本,253-0053)","茅ヶ崎(house,stop,railway,茅ヶ崎市,神奈川県,日本,253-0053)","茅ヶ崎(house,stop,railway,茅ヶ崎市,神奈川県,日本,253-0053)","茅ヶ崎(house,station,railway,茅ヶ崎市,神奈川県,日本,253-0053)","茅ヶ崎(house,stop,railway,茅ヶ崎市,神奈川県,日本,253-0053)","茅ヶ崎(house,station,railway,茅ヶ崎市,神奈川県,日本,253-0053)","茅ヶ崎(house,stop,railway,茅ヶ崎市,神奈川県,日本,253-0053)","茅ヶ崎(house,stop,railway,茅ヶ崎市,神奈川県,日本,253-0053)","湘南ジャンクヤード (株)ユーメディアモータース(house,motorcycle,shop,茅ヶ崎市,神奈川県,日本,2540023)","東海道(street,trunk,highway,茅ヶ崎市,神奈川県,日本,2540023)","北茅ヶ崎(house,station,railway,茅ヶ崎市,神奈川県,日本,253-8686)","茅ヶ崎市立病院(house,hospital,amenity,茅ヶ崎市,神奈川県,日本,253-8686)","香川(house,station,railway,茅ヶ崎市,神奈川県,日本,253-0113)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E3%82%BD%E3%83%8B%E3%83%BC%E3%82%B9%E3%83%88%E3%82%A2%20%E5%A4%A7%E9%98%AA&lang=ja',
  q: 'ソニーストア 大阪',
  result: '["ソニーストア(house,electronics,shop,大阪市,北区,大阪府,日本,530-0001)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E5%8C%97%E5%B2%B3&lang=ja',
  q: '北岳',
  result: '["北岳(locality,peak,natural,日本)","北岳(locality,peak,natural,日本)","北岳(locality,peak,natural,日本)","北岳庄(district,village,place,大同市,山西省,中国)","北岳村(district,village,place,衡水市,河北省,中国,053000)","北岳庄村(district,village,place,濮陽市,河南省,中国)","北岳家庄村(district,village,place,衡水市,河北省,中国,053000)","北岳新城(locality,residential,landuse,ハルビン市,松浦街道,黒竜江省,中国,150000)","北岳庙(locality,park,leisure,中国)","北岳庄路(street,residential,highway,天津市,中国)","北岳見晴らし台(locality,locality,place,南アルプス市,山梨県,日本)","北岳庄路(street,tertiary,highway,宁河镇,天津市,中国)","北岳中学(house,school,amenity,大同市,北街街道,山西省,中国,037044)","北岳庙(house,place_of_worship,amenity,麗江市,玉龙纳西族自治县 Yulong,雲南省,中国)","北岳の茶屋(house,cafe,amenity,八戸市,青森県,日本,031-0032)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E5%A6%99%E9%AB%98%E5%B1%B1&lang=ja',
  q: '妙高山',
  result: '["妙高山(locality,peak,natural,日本)","関山(house,station,railway,妙高市,新潟県,日本)","乙見山峠(locality,locality,place,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)","大原関山停車場線(street,secondary,highway,妙高市,新潟県,日本)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E6%97%A5%E6%9C%AC%E5%A4%A7%E5%AD%A6&lang=ja',
  q: '日本大学',
  result: '["日本大学会館(house,university,building,東京都,千代田区,日本,102-8275)","日本大学高等学校; 日本大学中学校(house,school,amenity,横浜市,港北区,神奈川県,日本,231-0017)","日本大学医学部付属板橋病院(house,hospital,amenity,東京都,板橋区,日本,173-0032)","日本大学 陸上競技場(locality,recreation_ground,landuse,日本,156-0045)","私立 日本大学 第一中学校 第一高等学校(house,school,amenity,東京都,墨田区,日本,130-014)","日本大学鶴ヶ丘高等学校 総合運動場(locality,recreation_ground,landuse,日本)","日本大学山形高等学校 総合運動場(locality,recreation_ground,landuse,日本)","日本大学理工学部御茶ノ水校舎(house,university,amenity,東京都,神田,日本,101-0052)","京都橘大学(house,university,amenity,京都市,山科区,京都府,日本,607-8175)","佐野日本大学短期大学(house,college,amenity,佐野市,栃木県,日本,〒327-0803)","日本大学(house,university,amenity,藤沢市,神奈川県,日本,252-0813)","日本大学(house,yes,building,習志野市,千葉県,日本,275-0011)","日本大学(house,university,amenity,習志野市,千葉県,日本,275-0011)","日本大学(house,university,amenity,東京都,世田谷区,日本,156-0045)","日本大学(house,university,amenity,東京都,神田,日本,101-0062)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E7%9C%8C%E7%AB%8B%E8%8C%85%E3%83%B6%E5%B4%8E%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1&lang=ja',
  q: '県立茅ヶ崎高等学校',
  result: '["県立茅ヶ崎高等学校(house,school,amenity,茅ヶ崎市,神奈川県,日本,253-0028)","県立茅ヶ崎北陵高等学校(house,school,amenity,茅ヶ崎市,神奈川県,日本,253-0113)","県立茅ヶ崎西浜高等学校(house,school,amenity,茅ヶ崎市,神奈川県,日本,235-0061)","神奈川県立有馬高等学校(house,school,amenity,海老名市,社家,神奈川県,日本,243-0424)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E8%8C%85%E3%83%B6%E5%B4%8E%E9%AB%98%E7%AD%89%E5%AD%A6%E6%A0%A1&lang=ja',
  q: '茅ヶ崎高等学校',
  result: '["県立鶴嶺高等学校(house,school,amenity,茅ヶ崎市,神奈川県,日本,253-8686)","県立茅ヶ崎高等学校(house,school,amenity,茅ヶ崎市,神奈川県,日本,253-0028)","県立茅ヶ崎北陵高等学校(house,school,amenity,茅ヶ崎市,神奈川県,日本,253-0113)","県立茅ヶ崎西浜高等学校(house,school,amenity,茅ヶ崎市,神奈川県,日本,235-0061)","湘南工科大学附属高等学校(house,school,amenity,藤沢市,神奈川県,日本,251-0045)","私立アレセイア湘南高等学校(house,school,amenity,茅ヶ崎市,神奈川県,日本,253-0028)","神奈川県立有馬高等学校(house,school,amenity,海老名市,社家,神奈川県,日本,243-0424)","旧神奈川県立 新磯高等学校(house,school,amenity,座間市,神奈川県,日本,252-0011)","上溝高校入口(house,bus_stop,highway,相模原市,中央区,神奈川県,日本,2520243)","北陵高校入口(house,bus_stop,highway,茅ヶ崎市,神奈川県,日本,253-0113)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E9%9D%99%E5%B2%A1%E7%9C%8C%E4%BC%8A%E6%9D%B1%E5%B8%82&lang=ja',
  q: '静岡県伊東市',
  result: '["伊東市(city,city,place,静岡県,日本)","パン時館(house,bakery,shop,伊東市,静岡県,日本,〒413-0231)","パン時館(house,bakery,shop,伊東市,静岡県,日本,〒413-0231)","セブンイレブン 伊東湯川店(house,convenience,shop,伊東市,静岡県,日本,414-0002)","伊東(house,stop,railway,伊東市,静岡県,日本,414-0002)","ライダーハウス バグラント ライハ 【  ライダーズハウス ゲストハウス 天城 】(house,guest_house,tourism,伊豆市,静岡県,日本,4130234)","伊東(house,station,railway,伊東市,静岡県,日本,414-0002)","伊東(house,stop,railway,伊東市,静岡県,日本,414-0002)","伊東(house,stop,railway,伊東市,静岡県,日本,414-0002)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,station,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E9%9D%99%E5%B2%A1%E7%9C%8C%E4%BC%8A%E6%9D%B1%E5%B8%82&lang=ja&lat=33.25625612088059&lon=131.19862044980232&zoom=8',
  q: '静岡県伊東市',
  result: '["伊東市(city,city,place,静岡県,日本)","パン時館(house,bakery,shop,伊東市,静岡県,日本,〒413-0231)","パン時館(house,bakery,shop,伊東市,静岡県,日本,〒413-0231)","セブンイレブン 伊東湯川店(house,convenience,shop,伊東市,静岡県,日本,414-0002)","ライダーハウス バグラント ライハ 【  ライダーズハウス ゲストハウス 天城 】(house,guest_house,tourism,伊豆市,静岡県,日本,4130234)","伊東(house,stop,railway,伊東市,静岡県,日本,414-0002)","伊東(house,station,railway,伊東市,静岡県,日本,414-0002)","伊東(house,stop,railway,伊東市,静岡県,日本,414-0002)","伊東(house,stop,railway,伊東市,静岡県,日本,414-0002)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,station,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)","修善寺(house,stop,railway,伊豆市,静岡県,日本,410-2407)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E3%82%BB%E3%83%96%E3%83%B3%E3%82%A4%E3%83%AC%E3%83%96%E3%83%B3&lang=ja&lat=34.96570958880919&lon=139.0937166259622&location_bias_scale=0.1&zoom=14',
  q: 'セブンイレブン',
  result: '["セブンイレブン 伊東湯川店(house,convenience,shop,伊東市,静岡県,日本,414-0002)","セブンイレブン(house,convenience,shop,伊東市,静岡県,日本,414-0051)","セブンイレブン(house,convenience,shop,熱海市,静岡県,日本,〒413-0102)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0028)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0042)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0012)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0002)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0023)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0042)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0051)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0051)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,414-0002)","セブン-イレブン(house,convenience,shop,熱海市,静岡県,日本,〒413-0102)","セブン-イレブン(house,convenience,shop,熱海市,静岡県,日本,〒413-0102)","セブン-イレブン(house,convenience,shop,伊東市,静岡県,日本,413-0232)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E3%82%BB%E3%83%96%E3%83%B3%E3%82%A4%E3%83%AC%E3%83%96%E3%83%B3&lang=ja&lat=34.96570958880919&lon=139.0937166259622&location_bias_scale=0.8&zoom=14',
  q: 'セブンイレブン',
  result: '["セブンイレブン(locality,retail,landuse,いすみ市,千葉県,日本)","セブンイレブン(locality,retail,landuse,東京都,渋谷区,日本)","セブンイレブン(locality,retail,landuse,伊勢崎市,群馬県,日本)","セブンイレブン(locality,retail,landuse,安城市,愛知県,日本)","セブンイレブン(locality,retail,landuse,犬山市,愛知県,日本)","セブンイレブン(locality,retail,landuse,和歌山市,和歌山県,日本,640-8511)","セブンイレブン(locality,retail,landuse,和歌山市,和歌山県,日本,640-8511)","セブンイレブン(locality,retail,landuse,和歌山市,和歌山県,日本,640-8511)","セブンイレブン(locality,retail,landuse,高槻市,大阪府,日本)","セブンイレブン(locality,retail,landuse,酒田市,山形県,日本)","セブンイレブン(locality,retail,landuse,佐野市,栃木県,日本)","セブンイレブン(locality,retail,landuse,甲賀市,滋賀県,日本)","セブンイレブン(locality,retail,landuse,犬山市,愛知県,日本)","セブンイレブン(locality,retail,landuse,東郷町,愛知県,日本)","セブンイレブン(locality,retail,landuse,越谷市,埼玉県,日本)"]'
}
{
  url: 'http://34.85.13.206/api/poi?q=%E6%97%A5%E5%85%89%E6%9D%B1%E7%85%A7%E5%AE%AE&lang=ja',
  q: '日光東照宮',
  result: '["日光東照宮(house,bus_stop,highway,日光市,栃木県,日本,321-1401)","日光東照宮宝物館(house,museum,tourism,日光市,栃木県,日本,321-1401)","東照宮(house,place_of_worship,amenity,日光市,栃木県,日本,321-1401)","東照宮(house,heritage,historic,日光市,栃木県,日本,321-1401)","東照宮美術館(house,museum,tourism,日光市,栃木県,日本,321-1401)","東照宮晃陽苑前(house,bus_stop,highway,日光市,栃木県,日本,3211273)"]'
}

JinIgarashi avatar Jul 15 '21 01:07 JinIgarashi

@lonvia I think this PR's Japanese language searching is almost ready now. I officially changed the status of PR from draft. Let us know any feedbacks from the community.

Requirements

I wrote the installation procedure in Building section of README.

You need to install 3 elasticsearch plugins - analysys-icu, analysys-kuromoji and analysys-sudachi manually before executing mvn clean package. It also requires to download the latest dictionary for analysys-sudachi. These plugins are not necessary for other languages, so I don't know what is the best to include in Photon's source code. Maybe we need to create index_settings.json and mapping.json for ja programmatically?

The size of planet index

Because now we create index for Japanese language, so the size of Elasticsearch index become larger. I created the index for en and ja, and it is now 117GB for planet index. Index size for only Japanese country data is around 2.0GB.

Test server

You may try Japanese version of Photon in our test server. The languages are only available for en and ja. I think our changes does not affect anything for other languages. For en, it should be the same with original Photon.

http://35.189.154.86:2322/api?q=%E6%9D%B1%E4%BA%AC&lang=ja&debug=1

Note. This server might stop anytime.

JinIgarashi avatar Jul 15 '21 04:07 JinIgarashi

@JinIgarashi Unfortunately you have now created a completely different search algorithm. I will have a closer look at the changes you have done and if some or all of them are useful for the generic search algorithm but sadly there is no way Japanese support can be merged into master unless it uses the same underlying search. It is simply not maintainable. I'm sorry.

lonvia avatar Jul 23 '21 09:07 lonvia

@lonvia Thank you for your comments. Is it really not possible to merge Japanese support into master? Finally, I created different algorithm because the language structure of Japanese and western language are totally different. Not like western language, Japanese has not spaces divided. we have to use special analyzer such as kuromoji or sudachi to tokenize the sentence.

Original Photon uses edge_ngram to filter first, but I realized this can't work well for Japanese language, that is why I changed No.1 query to filter by using Japanese analyzer first, then modified No. 4 query to re-rank searching result by edge_ngram later. So I believe my algorithm at lease respects Photon's search-as-you-type policy although it is totally different algorithm..

I think currently there is no OSM based geocoder support Japanese language well. At least this feature can help Japanese community if it can merge into Photon, I believe. Please let us know any suggestion or recommendation, so we can update the source code for maintainable.

JinIgarashi avatar Jul 24 '21 10:07 JinIgarashi