Vb – Please help

Vb – Please help

posted 12-06-2007 08:03 AM
I have to write a program for my programming final, and I have a really good idea, I just can’t figure out where to start (code wise).
the idea is to be able to type in a word problem (math), and the program would filter the input text and come up with a simple calculation, for example…

Jimmy has 3 apples, Billy took 2 apples away, how many apples does jimmy have?

The program would then filter it to

Jimmy has (3) apples, Billy took(-) (2) apples away, how many apples does jimmy have?(=)

and from the text, it would determine 3-2=

And then it would calculate it and come up with the answer.

I don’t want full codes, but what are some ideas to make this work?

And if possible, some ideas for keywords that could be used for this like Bought, Found = +, Lost, dropped = -, Etc

* 10 months ago

Report It
Richard H’s Avatar by Richard H
A Top Contributor is someone who is knowledgeable in a particular category.

Member since:
January 31, 2006
Total points:
51569 (Level 7)

Badge Image:
A Top Contributor is someone who is knowledgeable in a particular category.
Contributing In:
Music & Music Players

* Add to My Contacts
* Block User

Best Answer – Chosen by Voters
Planet Source Code has great examples. http://www.pscode.com

* 10 months ago

100% 1 Vote

* Report It

Is this what you are searching for?

* Rating: Good Answer
* Rating: Bad Answer

* 1 stars – mark this as Interesting!
Who found this interesting?
1. Richard H
* Email
* Comment (0)
* Save
o Add to private Watchlist
o Save to My Web
o Add to My Yahoo!
o Add to Del.icio.us
o RSS

There are currently no comments for this question.

* You must be logged into Answers to add comments. Sign in or Register.
Other Answers (3)
Show:

*
Specialissimus’s Avatar by Speciali…

Member since:
December 05, 2006
Total points:
122 (Level 1)

o Add to My Contacts
o Block User
To achieve this result, you would need to have variables (for Jimmy, and Billy, etc.), so that when your question terminates, the computer will know whose apples you want to know the quantity of.
o 10 months ago
0% 0 Votes
o 0 Rating: Good Answer
o 0 Rating: Bad Answer
o Report It
*
jacovkss2’s Avatar by jacovkss…
A Top Contributor is someone who is knowledgeable in a particular category.

Member since:
July 26, 2006
Total points:
6911 (Level 5)

Badge Image:
A Top Contributor is someone who is knowledgeable in a particular category.
Contributing In:
Programming & Design

o Add to My Contacts
o Block User
Nice idea, but if you have to ask how to start, it’s probably too hard for you to do. That, OR you would have to limit the ‘intelligence’ of your program to the point that it’s hardly useful (even for illustration purposes) anymore.

One problem you’d have to solve is the ambiguity of words and sentences. What if Jimmy bought 2 (extra) apples, but then Billy BOUGHT 3 apples FROM Jimmy? It’s quite hard to make it clear that in the first ‘bought’-case, the number of apples that Jimmy owns increases, but in the latter it decreases…

So my suggestion is to make this assignment a bit easier for yourself. 🙂 One way to do this is, is to limit the grammar that your program understands. You might for example make a program that works with Reverse Polish Notation (see source list below; google RPN for more info), and change the operators (+, -, *, etc.) to English words (plus, minus, multiply, etc.). That would be relatively easy, but hard enough to learn something in the process.

——————

winingteam
Geo Newbie

Leave a Reply