SHARE
TWEET

Untitled

a guest May 15th, 2016 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ----------
  2.  
  3. **update**
  4.  
  5. Both Alexey Golyshev and Rashid provide great solutions, though in terms of the quality of translation, Rashid's Google Translate solution is much better.
  6.  
  7. I want to add a workaround that is only specific to my example. My example actually comes from my recent post : [How to make a picture grid of all Nobel Laureates in physics?][4]
  8.  
  9. So the these names are all famous! They all got wikipedia pages! Fortunately, I just found Mathematica provides a function called `WikipediaData` which is quite useful. So here is the specific solution.
  10.  
  11.     Clear[wikiTranslation];
  12.     wikiTranslation[word_,language_:"Chinese"]:=language/.WikipediaData[word,"TitleTranslationRules"]
  13.  
  14. so
  15.  
  16.     In[57]:= wikiTranslation/@ namelist
  17.  
  18.     Out[57]= {"梶田隆章", "阿瑟 麦克唐纳", "赤崎勇", "天野浩", "中村修二"}
  19.  
  20. And actually this results are more accurate than google translation. e.g. 梶田隆章 is the official translation appears on all media in China
  21.  
  22. I think this wikipedia method should be the best solution for proper names: such as celebrity, countries, famous place etc
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top