"InactiveSemanticExpression" (Interpreter Type)
Wolfram Language expression given in natural language.
Details
- "InactiveSemanticExpression" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "InactiveSemanticExpression" does not require connectivity to the Wolfram Cloud.
- "InactiveSemanticExpression" keeps its result unevaluated by wrapping it in Inactivate.
Restriction Specifications
-
Restricted["InactiveSemanticExpression",{{choice1,…}}] one among choices Restricted["InactiveSemanticExpression",symbols] an expression involving only the given symbols (All, Automatic, or an explicit list) Restricted["InactiveSemanticExpression",symbols,contexts] an expression involving only the given symbols or symbols in the given contexts (All, Automatic, or an explicit list) Restricted["InactiveSemanticExpression",symbols,contexts,resultcontext] an expression involving only the given symbols or symbols in the given contexts, where the new symbols are created in resultcontext
Interpretation
- "InactiveSemanticExpression" yields an Inactive Wolfram Language expression.
Examples
Basic Examples (7)Summary of the most common use cases
Interpret expressions and avoid evaluation:
In[1]:=1

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-rae2nv
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-p83p1r
Out[2]=2

Find out Wolfram Language expressions corresponding to natural language queries:
In[1]:=1

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-zcc5wy
Out[1]=1

No evaluation is attempted when matching the choices:
In[1]:=1

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-lds4hl
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-zv5ygj
Out[2]=2

By default, all symbols are allowed. Restrict to a list of allowed symbols:
In[1]:=1

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-2se6b4
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-nkkthl
Out[2]=2

By default, new symbols are created in $Context, but a custom context can be specified:
In[1]:=1

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-onoqyk
Out[1]=1

Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-u3rgwj
Out[2]=2

Out[2]=2

Specify contexts for the allowed and output symbols:
In[1]:=1

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-wabou2
Out[1]=1

Out[1]=1

Prevent the creation of any new symbol:
In[1]:=1

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-jvrlf0
Out[1]=1

In[2]:=2

✖
https://wolfram.com/xid/0eyhnl3xiaiw5kmnc782xwwehaahyf0i-w1muxn
Out[2]=2
