Message Boards Message Boards

1
|
5926 Views
|
1 Reply
|
4 Total Likes
View groups...
Share
Share this post:

How do I use the Wolfram Alpha API for a crossword puzzle game?

Posted 11 years ago
Hello,

I have to program a game in JAVA using Wolfram Alpha API. The game is a crossword puzzle game. A pattern for the game like  "_al_ _la_ _"  for the player is given. We have to use Wolfram Alpha to retrieve the words and output it in the console. In that way I match the pattern from the user with Wolfram's in order to find out if they are meaningful or not and if more words are available. I already looked at the java binding but I cannot figure out on how to do it. We have to use the "plaintext" format.

So for the AlphaAPISample I put my app id in it and used:
String input = "_al_ _la_ _";
When I run it in NetBeans it does not give me the crosswords though. What do I need to change to retrieve the words from http://www.wolframalpha.com/input/?i=_al__la__&lk=3 ?

Thank you so much!

Kind regards
POSTED BY: Lisa Mustermann
@Lisa, before you test the java code, you will need your developer id set up online. Link: https://developer.wolframalpha.com/

I
f you do have the app id set up correctly, you can use the query input without spaces. I had a python thread about this similar application and I guess java just use its own url functions to do the same thing. Here is a snapshot about result: 

POSTED BY: Shenghui Yang
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