Group Abstract Group Abstract

Message Boards Message Boards

Workarounds for network timeouts when trying to use Interpreter["Person"]

POSTED BY: Seth Chandler
2 Replies

I would avoid using:

AmbiguityFunction -> First

When you do that, you're essentially asking Wolfram|Alpha to provide a complete list of all possible people that name. The "First" is then ran later, so it's a bit of a waste. The default value of the option, Automatic, gives you the most likely interpretation.

Also, AmbiguityFunction is just a very confusing option overall. "First" doesn't really give you the first value from the AmbiguityList. You really have to use a ReplaceAll and some pattern matching to work with them as some of the documentation examples show. It's unintuitive.

I did a bit of digging. I would expect that both

Interpreter["Person"]

and

Interpreter["Person", True &, Missing]

Would do the same query to Wolfram|Alpha. And they do. After all, the second one really just says what to do with failing interpretations. One interesting thing is that this query might request the PersonData paclet the first time it's called, which would make it take longer. Subsequent evaluations don't seem to call Wolfram|Alpha because the data is cached.

I could imagine that it might make sense to preload PersonData by calling it in some cases, but I don't think that's actually really helpful to you. I don't know of a workaround really. We could write some code to locally try to associate a String to one of the president entities. For a case of this size, I think that's feasible.

POSTED BY: Sean Clarke

So, I just ran it again and found that the code worked quite fast. The problem is thus something funky in the Internet or variable loads on the Wolfram servers. I wonder if it would be possible for Wolfram to post a load meter that people could look at so they could get a sense of how hits on their servers are going to fare. Or maybe a load heat map showing how load varies by day of week and time. That way, longish queries might be a ScheduledTask to be run later. Or maybe a WolframServerLoad function?

POSTED BY: Seth Chandler
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard