I’ve updated the code again, reducing it from about 1000 lines to around 700 lines:
http://www.mediafire.com/?v4i3erz3bn5vkg3
And I’ve updated the output, here is a example:
Input a sentence. Press Enter when done.
Police say a North Carolina man insisted his million-dollar note was real when h
e was buying $476 worth of items at a Walmart.
__________________
__________________
An input sentence is converted to lower case:
__________________
police say a north carolina man insisted his million-dollar note was real when h
e was buying $476 worth of items at a walmart.
__________________
The secret message in the sentence:
__________________
police north carolina man insisted milliondollar note was real when was worth it
ems at walmart
The last word is: walmart
__________________
Analysis part one:
__________________
letter vowel letter 0.533333
letter vowel vowel 0.266667
vowel vowel letter 0.200000
vowel vowel vowel 0.000000
Analysis part two:
__________________
Using the last word of the sentence: walmart,
these are four possible word associations:
call
attorney-general
anti-intellectual
annual
The result using Analysis part ones data is: anti-intellectual
_______________________________________________________________
_______________________________________________________________
Press any key to continue . . .
To the person asking for an explaination.
1.) a sentence is input.
2.) is it converted to lower case.
3.) It is searched for words that have at least one consonant the same as the last word has.
4.) These matching words are formed into a shortened version of the sentence, ofter revealing hidden messages in the sentence.
5.) Using the matching words I do percentage calculation which gives me the best word of four that matches how the sentence wants the reader to percieve the sentence, so the intention of the sentence is made into a single word.
To Jan Bogaerts,
That looks really good. What I am thinking of though is really a lot of work.
1) The hidden sentence has grammar attached to each word.
These grammar are then analyzed and the program creates a matching sentence that has the same grammar.
2) I can guess the best matching word for each word in the sentence, or I can make the sentence match the percentage values of the secret sentence, or a combination of the two, then check the program to see if the output makes any sense and if not tweak the rules for word matching and sentence creation.
So for these things I need a word list that has grammar.
I need grammar rules.
Then I need to think of how to build the code.
Then I have to build the code.
Then I have to debug it until it runs smoothly.
Then come here and see how you people like it, the bot should output whole natural language sentences then.
But a lot of work, so I don’t know at the moment if I want to or not.