WOLFRAM

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  (2)Summary of the most common use cases

Get the best semantic interpretation of a string:

Out[1]=1
Out[2]=2

Some semantic interpretations do not require Wolfram|Alpha:

Out[1]=1

Scope  (4)Survey of the scope of standard use cases

Return the most probable interpretation that matches a pattern:

Out[1]=1
Out[2]=2

Return an unevaluated result:

Out[1]=1

Return an inactivated result:

Out[1]=1

Apply an arbitrary function to the result:

Out[1]=1

Options  (3)Common values & functionality for each option

AmbiguityFunction  (3)

Get the most probable interpretation:

Out[1]=1
Out[2]=2

Get all interpretations:

Out[1]=1
Out[2]=2

Apply an arbitrary function in the case of ambiguity:

Out[1]=1

The AmbiguityFunction is not used if there is no ambiguity:

Out[2]=2

Properties & Relations  (1)Properties of the function, and connections to other functions

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

Out[1]=1

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

Out[2]=2

Possible Issues  (1)Common pitfalls and unexpected behavior

The local parser may not have knowledge of all entity types:

Out[1]=1

Use the default method to obtain the country interpretation:

Out[2]=2
Wolfram Research (2014), SemanticInterpretation, Wolfram Language function, https://reference.wolfram.com/language/ref/SemanticInterpretation.html (updated 2025).
Wolfram Research (2014), SemanticInterpretation, Wolfram Language function, https://reference.wolfram.com/language/ref/SemanticInterpretation.html (updated 2025).

Text

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

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

CMS

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

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

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: 29-March-2025 ]}

@misc{reference.wolfram_2025_semanticinterpretation, author="Wolfram Research", title="{SemanticInterpretation}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/SemanticInterpretation.html}", note=[Accessed: 29-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: 29-March-2025 ]}

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