使用英文字母对以母语编写的地址进行地理编码 [英] Geocode the address written in native language using English letters
问题描述
朋友,
我正在分析一些文字。我的要求是用不同的本地语言的英文字母写的地址。
,UP,INDIA在上面的句子中,ke paas - >是一个HINDI字(印度的国家语言),这意味着在英语和chandapur市场的近是一个名词(可以忽略转换)
现在我的挑战是转换数以千计的单词为英语,并确定街道名称和地理编码。不幸的是,我没有邮政编码或确切的地址。
你能帮我们吗?
感谢您的提前!
Google的 geocode api 支持印地语,所以你不一定要把它翻译成英文。下面是一个使用我的 googleway
包(在R中)指定 language =hi
参数的示例。
您需要一个API密钥才能通过 googleway
使用Google API
library(googleway)
set_key(your_api_key)
res< - google_geocode(address =village gorthaniya, UP,INDIA,
语言=hi)
geocode_address(res)
#[1]标记的272181,
geocode_coordinates(res)
#lat lng
#1 26.85848 82.50099
geocode_address_components(res)
#long_name short_name types
#1黄金地段地点,政治
#2政治地方政治administrative_area_level_2,政治
#3उत्तरप्र国家,政治
#5 272181 272181邮政编码
政治
#4भारतIN country,political
#5 272181 272181 postal_code
Friends,
I am analyzing some texts. My requirement is to gecode the address written in English letters of a different native language.
Ex: chandpur market ke paas, village gorthaniya, UP, INDIA
In above sentence words like, "ke paas" --> is a HINDI word (Indian national language), which means "near" in English and "chandapur market" is a noun (can be ignored for conversion)
Now my challenge is to convert such thousands of words to english and identify the street name and geo code it. Unfortunately, i do not have postal code or exact address.
Can you any one please help here?
Thanks in Advance !!
Google's geocode api supports Hindi, so you don't necessarily have to translate it to English. Here's an example using my googleway
package (in R) specifying the language = "hi"
argument.
You'll need an API key to use the Google API through googleway
library(googleway)
set_key("your_api_key")
res <- google_geocode(address = "village gorthaniya, UP, INDIA",
language = "hi")
geocode_address(res)
# [1] "गोर्थानिया, उत्तर प्रदेश 272181, भारत"
geocode_coordinates(res)
# lat lng
# 1 26.85848 82.50099
geocode_address_components(res)
# long_name short_name types
# 1 गोर्थानिया गोर्थानिया locality, political
# 2 बस्ती बस्ती administrative_area_level_2, political
# 3 उत्तर प्रदेश उ॰ प्र॰ administrative_area_level_1, political
# 4 भारत IN country, political
# 5 272181 272181 postal_code
这篇关于使用英文字母对以母语编写的地址进行地理编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!