"SemanticInteger" (Interpreter Type)
Integer number in a standard format or in natural language.
Details
- "SemanticInteger" can be used in Interpreter and related constructs, including deployed smart form fields.
- Use of "SemanticInteger" requires connectivity to the Wolfram Cloud.
Restriction Specifications
-
Restricted["SemanticInteger",{{choices1,…}}] one among choices Restricted["SemanticInteger",max] an integer below max Restricted["SemanticInteger",{min,max}] an integer between min and max Restricted["SemanticInteger",{min,max,s}] an integer between min and max, with step s
Interpretation
- "SemanticInteger" yields an Integer.
Examples
Basic Examples (2)
Interpreter["SemanticInteger"]["ten"]Interpreter["SemanticInteger"]["-15"]Interpreter[Restricted["SemanticInteger", {1, 3}]][{"one", "two", "three", "four"}]Restrict to the first five prime numbers:
Interpreter[Restricted["SemanticInteger", {Prime /@ Range[5]}]]["five"]Restrict to odd numbers below 100:
Interpreter[Restricted["SemanticInteger", {1, 100, 2}]]["seventeen"]Related Guides
History
Introduced in 2014 (10.0)