This essay does not describe an existing computer program, just one that should exist. This essay is about a suggested student project in Java programming. This essay gives a rough overview of how it might work. I have no source, object, specifications, file layouts or anything else useful to implementing this project. Everything I have prepared to help you is right here.
This project outline is not like the artificial, tidy little problems you are spoon-fed in school, when all the facts you need are included, nothing extraneous is mentioned, the answer is fully specified, along with hints to nudge you toward a single expected canonical solution. This project is much more like the real world of messy problems where it is up to you to fully the define the end point, or a series of ever more difficult versions of this project and research the information yourself to solve them.
Everything I have to say to help you with this project is written below. I am not prepared to help you implement it; or give you any additional materials. I have too many other projects of my own.
Though I am a programmer by profession, I don’t do people’s homework for them. That just robs them of an education.
You have my full permission to implement this project in any way you please and to keep all the profits from your endeavour.
Please do not email me about this project without reading the disclaimer above.This is a fairly simple artificial intelligence problem that mimicks, in miniature, the problem computer programmers have extracting specifications from users and turning those specifications into code.
Have a look at The Learn To Count Applet, particularly the source code. It contains code to count out in words in various languages.
I wrote the class for each language by getting a set of example numbers and words from a native speaker or a phrasebook or by sampling Internet posts, e.g. 21 == vingt et un in French and deducing the rules for converting numbers to words and writing the code. I would then print out a set of sample numbers using the rules (selecting the samples to ensure I cover all the rule variants) and check them with a native speaker. He would then give me some more examples to explain the exceptions to the rules he had forgotten about previously. I would then convert those exceptions into rules, code them and go round again until the native speaker was happy. Sometimes the native speaker would tell me the rules directly. Usually, these were less useful and less ambiguous than two or three examples.
I discovered there were various patterns in the rules. Different languages had various combinations of the standard patterns.
The process was fairly easy, quite mechanical and allowed for a fair bit of trial and error rather than demanding brute reasoning.
Could you automate the task of writing code for additional languages?
Could you write a program that, just shown some counting examples from a foreign language, could compose a program to generate all the longs out in words? The answer is yes, you could write such a program, no problem, though it would be cheating . It would just require a bit of patience to manually write the code for each human written language, then recognize it and cough up the previously optimised code when handed a set of examples in that language.
What we want is something a little cleverer, that could work on a language it had never seen before, but that was a human language. Again you could cheat, in a lesser way this time, my simply cataloging all features of counting in all written human languages, writing custom code to recognize each feature and cranking out code by turning on or off pieces of preformed boilerplate.
One way to attack the problem is to ask yourself, "How could I rapidly generate, generalise and optimise the cheating solution?" Another is, how could I solve the simpler problem of just handling the 20 or so languages the Learn To Count Applet already knows, or some subset of them.
So think of it as a contest. You will be handed a Java class, that will accept a long positive or negative and will return you a String for the corresponding number in words in the target language. Your program will then, by probing the class for examples and making inferences, construct a program that reproduces the one inside the black box to convert numbers to words for the unknown language inside the class.
You get points for:
This page is posted
Optional Replicator mirror
Your face IP:[126.96.36.199]
You are visitor number|