計算機科学のブログ

知識を広げる MathematicaでWolfram|Alphaのデータを使用する SemanticInterpretation、自由形式入力、CityDataコマンド、Entity、Properties、EntityVaue、猫(Singapura、シンガプーラ)の画像

ハンズ・オン・スタートMathematica® -Wolfram言語™によるプログラミング (C・ヘイスティング(著)、K・ミショー(著)、M・モリソン(著)、ウルフラム・リサーチ(翻訳)、丸善出版)の第2部(知識を広げる)、第22章(MathematicaでWolfram|Alphaのデータを使用する)の練習問題1、2、3、4、5、6、7、8、9、10の解答を求めてみる。

SemanticInterpretation["big apple"]
Output
InputForm[%]
Entity["City", {"NewYork", "NewYork", "UnitedStates"}]
Entity["City", {"NewYork", "NewYork", "UnitedStates"}]["Population"]
Output
WolframAlpha["top three cities in US"]
Output
INputForm[%]