Skip to main content

Questions tagged [interpreter]

Filter by
Sorted by
Tagged with
1 vote
0 answers
69 views

Bug in Interpreter with DelimitedSequence and alternatives?

In the context of this question I tried setting up an interpreter that converts a string to a list of numbers, while converting "NA" to ...
Roman's user avatar
  • 49.3k
7 votes
3 answers
247 views

How to identify and select the first name from a string containing a first name and a last name?

Is it possible to identify and select the first name in a string that is made up of a first name and a last name, e.g.: ...
Wolfgang123's user avatar
6 votes
1 answer
152 views

How can I tell the WL auto-magic date interpreter to use a day-first interpretation if there is ambiguity?

I know you can use DateObject[{"05-08-2022", {"Day", "Month", "Year" }}] to tell WL the date format explicitly, but a rigid ...
Sjoerd Smit's user avatar
  • 24.3k
2 votes
1 answer
69 views

Performance gains by avoiding the interpreter function

I have this. ...
atat's user avatar
  • 95
3 votes
1 answer
85 views

How to determine population from a list of arbitrary jurisdictions (cities, states, counties, et al.)?

I am an aspiring data scientist who's working on a passion project, namely to assign danger-level scores to police departments in the United States. One specific metric I'm developing results from ...
uselesslemma's user avatar
4 votes
1 answer
123 views

A function failes and a message appears only on Raspbery Pi OS

I met a message such that, Get::noopen: Cannot open /home/pi/.Mathematica/Paclets/Repository/Interpreter-1.3.140.0/Kernel/32Bit/Interpreter.mx when I call the '...
decafish's user avatar
2 votes
0 answers
48 views

Left-Right distinction of navicular inInterpreter["AnatomicalStructure"] function

I am playing with bone structure with Interpreter["AnatomicalStructure"] function. I noticed left-right distinction of navicular, one of the tarsal bones at the base of the foot, was not ...
Takashi Miura's user avatar
1 vote
0 answers
70 views

Why is this Interpreter Restriction failing?

Why is the following interpreter restriction on City failing? ...
user13892's user avatar
  • 9,651
2 votes
2 answers
103 views

FormPage does not evaluate arbitrary expression

Why a FormPage that simply evaluates an input expression FormPage[{"e" -> "Expression"}, #e &] does not evaluate ...
Fortsaint's user avatar
  • 2,060
5 votes
1 answer
190 views

Making an Email Address Validator

I wanted to make a simple email address validator using StringMatchQ. This was my first attempt: ...
ClydeTheGhost's user avatar
2 votes
0 answers
86 views

GeoRegionValuePlot optimization

I have the following piece of code that plots a colormap by zipcode. Zips is an array of zip codes (All in the US mainland) and testscore is just some made up data for testing purposes. The list of ...
Giovanni Baez's user avatar
11 votes
1 answer
189 views

Lexical scanning and parsing in a toy language

I'm trying to do lexical scanning and parsing in a toy language. One with just functions (of the form $f(a,\,b,\,c,\,...)$, ended with semicolons) and special tokens (such as ...
Nico A's user avatar
  • 3,644
2 votes
1 answer
80 views

Interpreter["Country"] returns only South Africa as a single item list

I am working with a list of countries that I then want to utilize Interpreter on for some later functionality. For some reason, "South Africa" returns as a single ...
kickert's user avatar
  • 1,840
0 votes
0 answers
68 views

Interpreter for Quantities without magnitude

When using a quantity interpreter on a unit without magnitude, the interpreter fails, but works fine on quantities with magnitudes. Ex: ...
Max Coplan's user avatar
14 votes
1 answer
279 views

What to expect from Interpreter["Expression"]?

Sometimes it works ok Interpreter["Expression"]["1"] 1 sometimes not: Interpreter["Expression"]["Graphics[{}]"] Why ...
Kuba's user avatar
  • 137k
0 votes
0 answers
84 views

Why does Interpreter fail intermittently?

I notice that, when I process CSV files and using Interpreter, I sometimes get Interpreter failure for certain dates as shown below: I am using the following ...
wlnwtz28's user avatar
6 votes
1 answer
103 views

Alternative to failing Interpreter["Location"] for Postcodes in the United Kingdom

Interpreter constrained for the form "Location" returns coordinates of a geographic location. For example ...
rhermans's user avatar
  • 37k
0 votes
0 answers
91 views

Control interpretation by Import

When I Import an Excel file, sometimes Mathematica interprets the dates as DateObjects, and sometimes it doesn't. How can I ...
CarbonFlambe's user avatar
  • 1,244
5 votes
3 answers
751 views

Get CountryData from 3 letter abbreviation of country name

On browsing ATP rankings I stumbled on a simple problem ...
rhermans's user avatar
  • 37k
1 vote
1 answer
69 views

Overriding an interpreter failure message in a FormFunction expression

I am building a Form to capture several non-zero numbers as inputs. The basic code is: ...
user46831's user avatar
  • 653
8 votes
2 answers
852 views

How to speed up interpreting numbers from strings?

In processing a large text file I have batches from ReadList of 100,000 Records of the form. ...
Edmund's user avatar
  • 43.1k
17 votes
1 answer
556 views

Programming of a natural language interface

I've just started using the Mathematica natural language interface and found it very interesting. After doing some research, I found some documentation on the "Programmable Linguistic Interface": ...
Burton Samograd's user avatar
2 votes
1 answer
164 views

Redefined MakeExpression leads to error in interpreting

I’d like to have a TemplateBox that interprets as its content boxes: ...
McSaks's user avatar
  • 183
15 votes
3 answers
1k views

Inverse of Interpreter["Color"]: Convert a RGBColor to a natural language color name

What is the best way to create the inverse function of Interpreter["Color"]? That function takes a natural language color name like ...
hftf's user avatar
  • 959
0 votes
1 answer
164 views

Interpreter fails to parse Numbers and Percents

Interpreter fails on Association with mixed type Values: ...
alancalvitti's user avatar
  • 15.2k
1 vote
0 answers
275 views

Can I use Mathematica to translate a English word to a Chinese characters?

I'm Chinese. I want to translate an Entity name to Chinese characterc. What should I do? Can I use Mathematica to translate a English word to a Chinese characters?
yode's user avatar
  • 27k
4 votes
0 answers
203 views

Improving semantic interpretation of dates

SemanticInterpretation and Interpreter are promising but imperfect, eg extracting dates and calendar expressions from semi-...
alancalvitti's user avatar
  • 15.2k
5 votes
1 answer
111 views

"ComputedDate"'s interpretation of "next"

Today Interpreter["ComputedDate"] /@ {"next Monday", "next Tuesday", "next Wednesday"} What explains this behavior? Can it ...
mfvonh's user avatar
  • 8,480
1 vote
0 answers
684 views

Abort Dynamic Evaluation error

I have been trying to run the example for geographic visualization at: Density of Library Books in the United States The first two lines of this code are: ...
Tyler Durden's user avatar
  • 4,102
13 votes
2 answers
1k views

Parsing a CSV file using Interpreter

The new Interpreter functionality in version 10 looks like it has the potential to make parsing custom data formats very easy. I'm trying to create a CSV parser. ...
Szabolcs's user avatar
  • 236k