Message Boards Message Boards

0
|
6341 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

GrammarRules and GrammarApply

Hi,

Why is it that GrammarRules[] and GrammarApply[] functions work only on the cloud? What if I want to experiment with parsing languages, but want them to run my local Mathematica? I am running ver 10.1, so I guess I am not missing something.

Regards,

Rangarajan

2 Replies

For simple grammars without GrammarTokens, you can make a recursive decent parser. Mathematica's pattern matching helps a lot, often making writing the simple parser trivial when compared to languages without it.

GrammarRules and GrammarApply use GrammarTokens. GrammarTokens are like Interpreters built into the grammar and have to be specially handled. Most GrammarTokens connect to Wolfram|Alpha, just like most Interpreters do.

Because these GrammarTokens query a server, parsing a string is more difficult. You want to minimize how many times you query the server and you want the queries to happen fast. Parsing on a server configured for this purpose seems like the ideal solution. I'm not aware of another piece of software or library in a similar situation.

POSTED BY: Sean Clarke

That is interesting information. Thanks.

Regards,

Rangarajan

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

Group Abstract Group Abstract