SemanticInterpretation

SemanticInterpretation["string"]

指定された自由形式文字列の最良の意味解釈をWolfram言語の式として返そうと試みる.

SemanticInterpretation["string",pattern]

可能な意味解釈をフィルターに掛け,指定されたパターンにマッチする最良ものを返す.

SemanticInterpretation["string",pattern,head]

指定された頭部でくくられた意味解釈を返す.

詳細とオプション

  • "string"は,自然言語の英語のテキストでよい.
  • 返されるオブジェクトタイプには,数,式,Entityオブジェクト,DateObject等がある.
  • 使用可能なオプション
  • AmbiguityFunction Automatic可能な解釈のリストに適用する関数
    GeoLocation$GeoLocation仮定する地理的位置
    TimeZone$TimeZone意味解釈のために仮定する時刻帯
    MethodAutomatic使用するパーサー
  • 複数の意味解釈が求まった場合,SemanticInterpretationは求まった解釈のリストを(最良のものを先頭に置いて)AmbiguityFunctionの設定で指定された関数に与える.この関数を適用した結果が,SemanticInterpretationからの結果として返される.
  • デフォルトで,SemanticInterpretationはWolfram|Alphaサーバを使う.Method"LocalParse"オプションでは,解釈が見付からない場合を除いてWolfram|Alphaサーバは呼ばれない.

例題

すべて開くすべて閉じる

  (2)

文字列の,最善の意味解釈を得る:

意味解釈の中にはWolfram|Alphaを必要としないものもある:

スコープ  (4)

パターンにマッチする,最も可能性の高い解釈を返す:

未評価の結果を返す:

非アクティブな結果を返す:

結果に任意の関数を適用する:

オプション  (3)

AmbiguityFunction  (3)

最も可能性の高い解釈を得る:

すべての解釈を得る:

曖昧さがある場合に任意の関数を適用する:

曖昧さがない場合は,AmbiguityFunctionは使われない:

特性と関係  (1)

SemanticInterpretation["s"]WolframAlpha["s","WolframResult"]は,事実上等しい:

SemanticInterpretation["s",_,HoldComplete]WolframAlpha["s","WolframRParse]もまたそうである:

考えられる問題  (1)

ローカルパーサーにはすべての実体タイプについての知識はないかもしれない:

デフォルトメソッドを使って国の解釈を取得する:

Wolfram Research (2014), SemanticInterpretation, Wolfram言語関数, https://reference.wolfram.com/language/ref/SemanticInterpretation.html (2025年に更新).

テキスト

Wolfram Research (2014), SemanticInterpretation, Wolfram言語関数, https://reference.wolfram.com/language/ref/SemanticInterpretation.html (2025年に更新).

CMS

Wolfram Language. 2014. "SemanticInterpretation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/SemanticInterpretation.html.

APA

Wolfram Language. (2014). SemanticInterpretation. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SemanticInterpretation.html

BibTeX

@misc{reference.wolfram_2025_semanticinterpretation, author="Wolfram Research", title="{SemanticInterpretation}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/SemanticInterpretation.html}", note=[Accessed: 31-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_semanticinterpretation, organization={Wolfram Research}, title={SemanticInterpretation}, year={2025}, url={https://reference.wolfram.com/language/ref/SemanticInterpretation.html}, note=[Accessed: 31-March-2025 ]}