Japanese to english translation

Viewed 53

I am trying to build power network model for Japan using OpenStreetMap data and some open source projects. When I filtered the power data I realized that most of the tag information (words such as power station, power lines etc.) is in Japanese (Japanese characters).

I am wondering whether if anyone knows of any translation packages that I can use to convert tags to English.

Does anyone know if there are any packages in Julia for translation purpose (Japanese -> English).

1 Answers

For map data you mostly need English name spelling rather than translation. Hence my first try would be TextUnidecode

using TextUnidecode

julia> unidecode("尾垂山")
"Wei Chui Shan"

Please also note that OSM records for popular places always have English translations (tagged with name:en) - and this is perhaps something you want to use - see the example below:

<node id="4165900342" lat="33.2750587" lon="134.1751027" version="2"  ... >
    <tag k="ele" v="242"/>
    <tag k="name" v="尾垂山"/>
    <tag k="name:en" v="Mt. Otaru"/>
    <tag k="name:ja" v="尾垂山"/>
    <tag k="name:ja-Hira" v="おたるやま"/>
    <tag k="natural" v="peak"/>
    <tag k="source" v="GSImaps/std"/>
  </node>

If those approaches do not match your needs, you can just use a Python library via PyCall.jl or call a service such as AWS Translate which is directly supported via AWS.jl library.

Related