SemanticInterpretation

SemanticInterpretation["string"]

attempts to give the best semantic interpretation of the specified free-form string as a Wolfram Language expression.

SemanticInterpretation["string",pattern]

filters possible semantic interpretations, returning the best one that matches the specified pattern.

SemanticInterpretation["string",pattern,head]

returns the semantic interpretation wrapped with the specified head.

Details and Options

Examples

open allclose all

Basic Examples  (1)

Get the best semantic interpretation of a string:

Scope  (4)

Return the most probable interpretation that matches a pattern:

Return an unevaluated result:

Return an inactivated result:

Apply an arbitrary function to the result:

Options  (3)

AmbiguityFunction  (3)

Get the most probable interpretation:

Get all interpretations:

Apply an arbitrary function in the case of ambiguity:

The AmbiguityFunction is not used if there is no ambiguity:

Properties & Relations  (1)

SemanticInterpretation["s"] and WolframAlpha["s","WolframResult"] are effectively equivalent:

So are SemanticInterpretation["s",_,HoldComplete] and WolframAlpha["s","WolframRParse]:

Wolfram Research (2014), SemanticInterpretation, Wolfram Language function, https://reference.wolfram.com/language/ref/SemanticInterpretation.html.

Text

Wolfram Research (2014), SemanticInterpretation, Wolfram Language function, https://reference.wolfram.com/language/ref/SemanticInterpretation.html.

CMS

Wolfram Language. 2014. "SemanticInterpretation." Wolfram Language & System Documentation Center. Wolfram Research. 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_2024_semanticinterpretation, author="Wolfram Research", title="{SemanticInterpretation}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/SemanticInterpretation.html}", note=[Accessed: 05-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_semanticinterpretation, organization={Wolfram Research}, title={SemanticInterpretation}, year={2014}, url={https://reference.wolfram.com/language/ref/SemanticInterpretation.html}, note=[Accessed: 05-December-2024 ]}