SemanticInterpretation

SemanticInterpretation["string"]

尝试以 Wolfram 语言表达式的形式给出指定自由格式字符串的最佳语义解释.

SemanticInterpretation["string",pattern]

对可能的语义解释滤波,返回与指定模式匹配的最佳解释.

SemanticInterpretation["string",pattern,head]

返回使用指定头部封装的语义解释.

更多信息和选项

范例

打开所有单元关闭所有单元

基本范例  (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 语言. 2014. "SemanticInterpretation." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2025. https://reference.wolfram.com/language/ref/SemanticInterpretation.html.

APA

Wolfram 语言. (2014). SemanticInterpretation. Wolfram 语言与系统参考资料中心. 追溯自 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 ]}