Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Wolfram Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • System Modeler
  • Wolfram Player
  • Finance Platform
  • Wolfram Engine
  • Enterprise Private Cloud
  • Application Server
  • Wolfram|Alpha Notebook Edition
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

WolframConsulting.com

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Wolfram Notebook Assistant + LLM Kit
    • System Modeler
    • Wolfram Player
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Wolfram Engine
    • Enterprise Private Cloud
    • Application Server
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
Interpreter   
  • See Also
    • SemanticInterpretation
    • GrammarToken
    • ToExpression
    • ImportString
    • SemanticImportString
    • Entity
    • DateObject
    • APIFunction
    • FormFunction
    • $InterpreterTypes
    • Classify
    • TextCases
  • Related Guides
    • Setting Up Input Interpreters
    • Converting between Expressions & Strings
    • Date & Time
    • Free-Form & External Input
    • Text Manipulation
    • String Manipulation
    • Creating Form Interfaces & Apps
    • Creating Instant APIs
    • Geographic Data & Entities
    • Knowledge Representation & Access
    • Locations, Paths, and Routing
    • WDF (Wolfram Data Framework)
    • Text Normalization
    • Programmable Linguistic Interface
    • External Interpreted Language Interfaces
    • Linguistic Data
    • See Also
      • SemanticInterpretation
      • GrammarToken
      • ToExpression
      • ImportString
      • SemanticImportString
      • Entity
      • DateObject
      • APIFunction
      • FormFunction
      • $InterpreterTypes
      • Classify
      • TextCases
    • Related Guides
      • Setting Up Input Interpreters
      • Converting between Expressions & Strings
      • Date & Time
      • Free-Form & External Input
      • Text Manipulation
      • String Manipulation
      • Creating Form Interfaces & Apps
      • Creating Instant APIs
      • Geographic Data & Entities
      • Knowledge Representation & Access
      • Locations, Paths, and Routing
      • WDF (Wolfram Data Framework)
      • Text Normalization
      • Programmable Linguistic Interface
      • External Interpreted Language Interfaces
      • Linguistic Data

Interpreter[form]

represents an interpreter object that can be applied to an input to try to interpret it as an object of the specified form.

Interpreter[form,test]

returns the interpreted object only if applying test to it yields True; otherwise it returns a Failure object.

Interpreter[form,test,fail]

returns the result of applying the function fail if the test fails.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
AmbiguityFunction  
DateFormat  
DigitBlock  
Show More Show More
GeoLocation  
NumberPoint  
NumberSeparator  
NumberSigns  
TimeZone  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Related Guides
Related Links
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • SemanticInterpretation
    • GrammarToken
    • ToExpression
    • ImportString
    • SemanticImportString
    • Entity
    • DateObject
    • APIFunction
    • FormFunction
    • $InterpreterTypes
    • Classify
    • TextCases
  • Related Guides
    • Setting Up Input Interpreters
    • Converting between Expressions & Strings
    • Date & Time
    • Free-Form & External Input
    • Text Manipulation
    • String Manipulation
    • Creating Form Interfaces & Apps
    • Creating Instant APIs
    • Geographic Data & Entities
    • Knowledge Representation & Access
    • Locations, Paths, and Routing
    • WDF (Wolfram Data Framework)
    • Text Normalization
    • Programmable Linguistic Interface
    • External Interpreted Language Interfaces
    • Linguistic Data
    • See Also
      • SemanticInterpretation
      • GrammarToken
      • ToExpression
      • ImportString
      • SemanticImportString
      • Entity
      • DateObject
      • APIFunction
      • FormFunction
      • $InterpreterTypes
      • Classify
      • TextCases
    • Related Guides
      • Setting Up Input Interpreters
      • Converting between Expressions & Strings
      • Date & Time
      • Free-Form & External Input
      • Text Manipulation
      • String Manipulation
      • Creating Form Interfaces & Apps
      • Creating Instant APIs
      • Geographic Data & Entities
      • Knowledge Representation & Access
      • Locations, Paths, and Routing
      • WDF (Wolfram Data Framework)
      • Text Normalization
      • Programmable Linguistic Interface
      • External Interpreted Language Interfaces
      • Linguistic Data

Interpreter   

Listing of Interpreter Types »

Interpreter[form]

represents an interpreter object that can be applied to an input to try to interpret it as an object of the specified form.

Interpreter[form,test]

returns the interpreted object only if applying test to it yields True; otherwise it returns a Failure object.

Interpreter[form,test,fail]

returns the result of applying the function fail if the test fails.

Details and Options

  • Interpreter[…][input] applies the interpreter to a particular input, which is typically a string.
  • Possible form specifications include:
  • "Expression"any Wolfram Language expression
    "HeldExpression"expression to be returned held
    "InactiveExpression"expression to be returned inactivated
    "SemanticExpression"expression derived semantically from free-form input
    "Number"any number in a standard format
    "SemanticNumber"number derived semantically (e.g. "half")
    "ComputedNumber"number derived by computation (e.g. "2+2")
    "Integer"integer
    "SemanticInteger"integer derived semantically (e.g. "six")
    "ComplexNumber"real or complex number
    "MathExpression"mathematical expression (e.g. "sin(2x)+1")
    "MathFormula"mathematical formula (e.g. "2x+3y=0")
    "HeldMathFormula"mathematical formula to be returned held
    "HexInteger"integer in hexadecimal
    "RomanNumeral"Roman numerals
    "Boolean"Boolean value (true/false, 1/0, etc. giving True/False)
    "String"pure string
    "TextArea"text of any length (rendered in forms as a text area)
    "TextLine"single line of text
    "URLString"URL-encoded string
    "URL"correctly formatted URL
    "URLQueryString"URL query string
    "SemanticURL"URL derived semantically (e.g. from company name)
    "IPAddress"correctly formatted IP address
    "FileName"name of a file on your computer
    "UploadedFile"file to be uploaded to the cloud
    "CachedFile"file to be cached in a temporary directory
    "EmailAddress"correctly formatted email address
    "PhoneNumber"correctly formatted phone number
    "Date"date in any standard format
    "StructuredDate"date obtained from a picker
    "DateTime"date and time
    "Time"time of day
    "ComputedDate",etc.date derived by computation (e.g. "next tuesday")
    "Location"anything that yields a geo location
    "GeoCoordinates"geo position specifed as latitude, longitude
    "StreetAddress"any standard street address
    "Country"country or country-like territory
    "AdministrativeDivision"state, province, county, etc.
    "USState"US state
    "USCounty"US county
    "Quantity"quantity with units
    "ComputedQuantity"quantity derived by computation
    "StructuredQuantity"quantity given purely as number followed by unit
    "PhysicalQuantity"physical quantity (e.g. "mass")
    "CurrencyAmount"currency amount (e.g. "$7.50")
    "CurrencyName"name of a currency (e.g. "US dollars")
    "Company"company
    "TickerSymbol"financial instrument ticker symbol
    "Image"image
    "Color"color in any standard format
    "StructuredColor"color obtained from a picker
    "Sound"sound
    "Graphics"vector graphics
    "entity"any Wolfram Language entity type (e.g. "City")
    "entityclass"a class of entities (e.g. "CityClass")
    "format"any standard Wolfram Language import format
    Restricted[form,spec]a form restricted in the specified way
    DelimitedSequence[form,…]a delimited sequence of forms returned as a list
    form1|form2|…several possible forms, tried in order
    {c1,c2,…}a literal set of choices ci
    {lab1c1,lab2c2,…}choices ci with labels labi
    AnySubset[{c1,c2,…}]any subset of the ci
    CompoundElement[{form1,…}]a list of elements specified by the formi
    CompoundElement[<|key1form1,…|>]an association of elements specified by the formi
    RepeatingElement[form,…]a list of elements all specified by form
    CloudObject[…]a deployed GrammarRules object
    QuantityVariable["pq"]a quantity compatible with the physical quantity pq
  • $InterpreterTypes gives a complete list of possible interpreter types.
  • Interpreter[…][input] returns an interpreted value, Missing["NoInput"] if input is effectively blank, or Failure[…].
  • In the case of "entity", any domain supported by EntityValue can be used.
  • Interpreter["format"]["input"] is effectively equivalent to ImportString["input","format"].
  • Interpreter[choices] allows a list of rules or an association for choices. A pure list of values can also be used when there is no ambiguity.
  • Interpreter[form,test][input] applies test to the result of interpreting input using the specified form.
  • If the result of applying test is True, then the interpretation of input is returned.
  • If the result of applying test is a Failure object, this object is immediately returned.
  • If the result of applying test is False or anything else, then in Interpreter[form,test,fail][input] the result of applying fail to the interpretation of input is returned. If no fail is given, then a Failure object is returned.
  • If Interpreter directly generates a Failure object, the following tags are used:
  • "InterpretationFailure"the string given could not be interpreted in the form specified
    "RestrictionFailure"interpretation succeeded, but a restriction failed
    "ConditionFailure"interpretation and restrictions succeeded, but explicit test failed
    "ConnectionFailure"required cloud connection could not be made
  • Interpreter supports the following options:
  • AmbiguityFunction Automaticfunction to apply to ambiguous semantic results
    DateFormat $DateStringFormatdefault format to assume for dates
    DigitBlock Infinitynumber of digits between breaks to assume
    GeoLocation $GeoLocationgeo location to assume for semantic interpretation
    ImportOptions{}options to use when importing data
    NumberPoint "."string to assume for decimal points
    NumberSeparator {",", " "}string to assume at breaks between number blocks
    NumberSigns {"-",""}strings to assume for signs of negative and positive numbers
    TimeZone $TimeZonetime zone to assume for semantic interpretation
  • Interpreter[spec][{input1,input2,…}] is equivalent to {Interpreter[spec][input1],Interpreter[spec][input2],…}, except insofar as spec contains constructs such as CompoundElement or RepeatingElement that directly interpret the structure given.
  • Interpreter[form]["string1"|"string2"|…] yields as a result the interpretation of the first of the stringi that can be interpreted using the specified form.
  • Typically, Interpreter[form][CloudObject[…]], Interpreter[form][File[…]] and Interpreter[form][URL[…]] yield the result of interpreting the contents of the cloud object, file or URL according to the specified form.
  • For other expressions, Interpreter[form][expr] returns expr if expr conforms to the specification for form, and returns Failure[…] otherwise.

Examples

open all close all

Basic Examples  (8)

Interpret a number in any standard explicit format:

Interpret a number given linguistically:

Flag a failure if the input given is not of the type specified:

Interpret a date, generating a DateObject:

Interpret a city, generating an Entity object:

Interpret a university:

Interpret a location, returning a GeoPosition:

Interpret a list of numbers:

Interpret a File object:

Interpret a URL object:

Interpret a number restricted to be between 1 and 10:

If the number is outside the range, a failure is generated:

Interpret a city restricted to a geographical region:

Run a test on the result:

Use a custom failure mode when the test doesn't pass:

Scope  (3)

Interpret many types of entities:

Enable computations:

Interpret string representations of files:

Options  (9)

AmbiguityFunction  (1)

Return all the possible interpretations:

DateFormat  (2)

Specify a custom date format:

Specify multiple date formats to be tried in order:

DigitBlock  (1)

Change the maximum length of blocks of digits between separators:

GeoLocation  (1)

Set a location to use for semantic interpretations:

By default, the user's $GeoLocation is used:

NumberPoint  (1)

Set a custom decimal point:

NumberSeparator  (1)

Change the separator between blocks of digits:

NumberSigns  (1)

Change the signs for negative and positive numbers:

TimeZone  (1)

Set the time zone to use for semantic interpretations:

Properties & Relations  (4)

Interpreter specifications are used to create FormObject, FormFunction, and APIFunction:

The Interpreter head is optional, but it can be useful to specify options:

Use RepeatingElement and CompoundElement to interpret complicated structures:

Alternatives can also be used to interpret data that can have different shapes:

Possible Issues  (3)

The number and date options are not compatible with semantic interpreters:

If an AmbiguityFunction is set that is not Automatic, the test at the second argument is applied to its result, possibly leading to a failure:

Interpreter["String"] accepts an empty string. This is not true for FormFunction, where the empty string and an empty field are considered equivalent:

Neat Examples  (1)

Obtain the GeoPosition for the White House:

Show it on a map:

See Also

SemanticInterpretation  GrammarToken  ToExpression  ImportString  SemanticImportString  Entity  DateObject  APIFunction  FormFunction  $InterpreterTypes  Classify  TextCases

Function Repository: BuildInterpretationLookup

Related Guides

    ▪
  • Setting Up Input Interpreters
  • ▪
  • Converting between Expressions & Strings
  • ▪
  • Date & Time
  • ▪
  • Free-Form & External Input
  • ▪
  • Text Manipulation
  • ▪
  • String Manipulation
  • ▪
  • Creating Form Interfaces & Apps
  • ▪
  • Creating Instant APIs
  • ▪
  • Geographic Data & Entities
  • ▪
  • Knowledge Representation & Access
  • ▪
  • Locations, Paths, and Routing
  • ▪
  • WDF (Wolfram Data Framework)
  • ▪
  • Text Normalization
  • ▪
  • Programmable Linguistic Interface
  • ▪
  • External Interpreted Language Interfaces
  • ▪
  • Linguistic Data

Related Links

  • Fast Introduction for Programmers: Interpreters
  • An Elementary Introduction to the Wolfram Language : Natural Language Understanding
  • An Elementary Introduction to the Wolfram Language : Creating Websites and Apps

History

Introduced in 2014 (10.0) | Updated in 2015 (10.1) ▪ 2016 (11.0)

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

Text

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

CMS

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

APA

Wolfram Language. (2014). Interpreter. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Interpreter.html

BibTeX

@misc{reference.wolfram_2025_interpreter, author="Wolfram Research", title="{Interpreter}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/Interpreter.html}", note=[Accessed: 30-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_interpreter, organization={Wolfram Research}, title={Interpreter}, year={2016}, url={https://reference.wolfram.com/language/ref/Interpreter.html}, note=[Accessed: 30-November-2025]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Player
  • Wolfram Engine

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2025 Wolfram
© 2025 Wolfram | Legal & Privacy Policy |
English