in reply to Challenge: Predictive Texting

All entries must support the same API to be considered. Please define the API, preferably in perl.

Replies are listed 'Best First'.
Re^2: Challenge: Predictive Texting
by Limbic~Region (Chancellor) on Jan 10, 2007 at 16:10 UTC
    Anonymous Monk],
    Please define the API, preferably in perl.

    To quote myself:
    Digits will be passed in one at a time. The expected return value will be the best "suggestion" for the amount of information provided so far. If instead of a digit, a '+' is passed in, it means that the word is finished being spelled and the correct word has been returned. If instead of a digit, a '-' is passed in, it means that the word is finished being spelled but the "suggested" word is incorrect. Digits will resume following a '+'.

    Admittedly, I should have said "All entries must provide a similar API to be considered." In other words, your solution must provide a mechanism for accepting input and providing output as described above.

    Cheers - L~R

      What is the mechanism for accepting input/providing output?
        Anonymous Monk,
        The code using your solution will expect a sub or an object method to provide input to and will expect the return value to get output.

        Cheers - L~R