|
Posted: Jan 2, 2012 |
[ # 76 ]
|
|
Experienced member
Total posts: 56
Joined: Jan 23, 2011
|
Impressive @Jan,
Is Mika your bot?
@Jeremy,
it’s nice too see that you’re using the critics to improve yourself.
|
|
|
|
|
Posted: Jan 2, 2012 |
[ # 77 ]
|
|
Senior member
Total posts: 697
Joined: Aug 5, 2010
|
Thanks Fatima.
Mika isn’t exactly my bot. She’s 1 of the 2 default characters/avatars available in my chatbot designer. I don’t really have a bot, I’m more of an engine/tools designer, though I’m forcing myself into writing a minimal but functional little bot for the android version (and later on, for the website as well).
|
|
|
|
|
Posted: Jan 2, 2012 |
[ # 78 ]
|
|
Experienced member
Total posts: 46
Joined: Dec 17, 2011
|
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.
File Attachments
|
|
|
|
|
Posted: Jan 2, 2012 |
[ # 79 ]
|
|
Experienced member
Total posts: 46
Joined: Dec 17, 2011
|
Just for fun, I ran my program on some of the comments these last two pages and decided to post this one, so you could see the results.
Input a sentence. Press Enter when done.
If you are trying to find relationships between words, I suggest you try to use a thesaurus in your application.
__________________ __________________
An input sentence is converted to lower case: __________________
if you are trying to find relationships between words, i suggest you try to use a thesaurus in your application.
__________________
The secret message in the sentence: __________________
trying to find relationships between suggest try to thesaurus in application
The last word is: application __________________
Analysis part one: __________________
letter vowel letter 0.454545 letter vowel vowel 0.363636 vowel vowel letter 0.181818 vowel vowel vowel 0.000000
Analysis part two: __________________
Using the last word of the sentence: application, these are four possible word associations:
callousness
calla
caddie
cabby
The result using Analysis part ones data is: caddie
_______________________________________________________________ _______________________________________________________________
Press any key to continue . . .
That caddie is the percentage generated word, it shows the intention the sentence was trying to convey.
In golf, caddies do the same thing, give advice.
|
|
|
|
|
Posted: Jan 3, 2012 |
[ # 80 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
Why are you making a new sentence using the consonants from the last word in the sentence? What use is this?
For example, “I bought a stray from the pound.” would become “pound”. Surely, the whole sentence (or at least keywords, “bought”, “stray”, “pound”) should be used?
Where is
letter vowel vowel 0.266667 or
vowel vowel letter 0.200000 in “walmart”?
Your program suggests “application” and “caddie” are a good association rather than advice as you say. Also “walmart” and “anti intellectual”. Can you explain these links please? As I see it, a thesaurus like both myself and Jan have used would yield far better results.
|
|
|
|
|
Posted: Jan 3, 2012 |
[ # 81 ]
|
|
Experienced member
Total posts: 46
Joined: Dec 17, 2011
|
Steve Worswick - Jan 3, 2012: Why are you making a new sentence using the consonants from the last word in the sentence? What use is this?
For example, “I bought a stray from the pound.” would become “pound”. Surely, the whole sentence (or at least keywords, “bought”, “stray”, “pound”) should be used?
The word that uses percentages uses words that are in the shortened sentence to pick the word from the list of four possible words.
To that sentence this is the programs output:
Input a sentence. Press Enter when done.
I bought a stray from the pound.
__________________ __________________
An input sentence is converted to lower case: __________________
i bought a stray from the pound.
__________________
The secret message in the sentence: __________________
pound
The last word is: pound __________________
Analysis part one: __________________
letter vowel letter 1.000000 letter vowel vowel 0.000000 vowel vowel letter 0.000000 vowel vowel vowel 0.000000
Analysis part two: __________________
Using the last word of the sentence: pound, these are four possible word associations:
brushwood
bloodhound
barefooted
assorted
The result using Analysis part ones data is: barefooted
_______________________________________________________________ _______________________________________________________________
Press any key to continue . . .
Steve Worswick - Jan 3, 2012: Where is
letter vowel vowel 0.266667 or
vowel vowel letter 0.200000 in “walmart”?
‘Walmart’ is a whole percentage of 1.000000, those other words made the percentages that value. The percentages are based on the shortened version of the sentence, so ‘no day.’ is no a fraction of 1 but a whole number one.
Steve Worswick - Jan 3, 2012:
Your program suggests “application” and “caddie” are a good association rather than advice as you say. Also “walmart” and “anti intellectual”. Can you explain these links please? As I see it, a thesaurus like both myself and Jan have used would yield far better results.
The sentence with the generated word ‘caddie’ was a sentence he was giving me advice, in golf a caddie gives advice and he was giving me advice.
That walmart was given the word ‘anti-intellectual’ is because the shortened sentence made the percentage so that the chosen word to associate with the sentence was ‘anti-intellectual’: a man was shopping in walmart and tried to pay with a million dollar bill and get > 900000.00 change, that’s ‘anti-intellectual’ to many people.
I like the idea of the theosaurus but right now I’m now doing that. My results are in four varieties right now that are geared to match the intention of the sentence, not the word. While the theosaurus is totally geared to the word alone.
For instance, when I type ‘dog’ into my program I get ‘barefoot’. When I type ‘skynet’ I get ‘geek’ as the generated word, a theosaurus would do that for me.
Now I’m not saying a theosaurus is wrong, but right now it’s not what I’m doing.
I hope you understood everything I said in this reply to you?
|
|
|
|
|
Posted: Jan 4, 2012 |
[ # 82 ]
|
|
Experienced member
Total posts: 46
Joined: Dec 17, 2011
|
Hi, I made a word generator that got a random word from a list of words, and that seemed to work ok.
Then i updated my word list and started to generate sentences, but these sentences aren’t in a line like a real sentence,
but are in a stack of four words placed below 4 percentages.
Then I use the percentages to guess which of the four words best matches the intention the sentence was trying to convey.
So a lot of guessing.
Obviously the stacked four words aren’t going to read like a read sentence, they are like slang in a sense in that they aren’t a formal english sentence.
i did this for my chat-bot project which I left and thought how hard it would be for somebody else to do this so I went and did it and am now giving it to you or whomever for their chat-bot project.
So enough of the introduction I will now show you an example of the program running so you can read the output yourself and see if it makes and sense.
Input a sentence. Press Enter when done.
German authorities apparently use silent SMS to create a movement profile of sus pects or locate their position. SMS pings are received by a cellphone, but the u ser will not be notified of it. However, the cellphone carrier will record the d ata in a log, which can be requested by the government. While the data do not pr ovide information about the phone, they do deliver location data via the cell to wers that were used when the silent SMS was sent.
__________________ __________________
An input sentence is converted to lower case: __________________
german authorities apparently use silent sms to create a movement profile of sus pects or locate their position.
__________________
The secret message in the sentence: __________________
german authorities apparently use silent sms to create movement profile suspects locate their position
The last word is: position __________________
Analysis part one: __________________
letter vowel letter 0.571429 letter vowel vowel 0.214286 vowel vowel letter 0.071429 vowel vowel vowel 0.142857
Analysis part two: __________________
Using the last word of the sentence: position, these are four possible word associations:
Algren N
catenated t
beef NitV
Abyssinian banana h
The result using Analysis part ones data is: catenated t
_______________________________________________________________ _______________________________________________________________
__________________ __________________
An input sentence is converted to lower case: __________________
sms pings are received by a cellphone, but the user will not be notified of it.
__________________
The secret message in the sentence: __________________
but the not notified it
The last word is: it __________________
Analysis part one: __________________
letter vowel letter 0.400000 letter vowel vowel 0.400000 vowel vowel letter 0.200000 vowel vowel vowel 0.000000
Analysis part two: __________________
Using the last word of the sentence: it, these are four possible word associations:
Anteros N
ambush NVt
bivouacked V
Abyssinian banana h
The result using Analysis part ones data is: ambush NVt
_______________________________________________________________ _______________________________________________________________
__________________ __________________
An input sentence is converted to lower case: __________________
however, the cellphone carrier will record the data in a log, which can be requ ested by the government.
__________________
The secret message in the sentence: __________________
however the cellphone carrier record the data in log can requested the governmen t
The last word is: government __________________
Analysis part one: __________________
letter vowel letter 0.538462 letter vowel vowel 0.384615 vowel vowel letter 0.076923 vowel vowel vowel 0.000000
Analysis part two: __________________
Using the last word of the sentence: government, these are four possible word associations:
Ashleigh N
abnormalizing t
appraise tV
Abney level h
The result using Analysis part ones data is: abnormalizing t
_______________________________________________________________ _______________________________________________________________
__________________ __________________
An input sentence is converted to lower case: __________________
while the data do not provide information about the phone, they do deliver loca tion data via the cell towers that were used when the silent sms was sent.
__________________
The secret message in the sentence: __________________
the data not information about the phone they location data the towers that used when the silent sms was sent
The last word is: sent __________________
Analysis part one: __________________
letter vowel letter 0.450000 letter vowel vowel 0.400000 vowel vowel letter 0.100000 vowel vowel vowel 0.050000
Analysis part two: __________________
Using the last word of the sentence: sent, these are four possible word associations:
Algren N
abnormalising t
automobile NV
Abney level h
The result using Analysis part ones data is: abnormalising t
_______________________________________________________________ _______________________________________________________________
Press any key to continue . . .
The input sentence is a quote snippet from tomshardware article.
here is the link to the source and program, the file the program reads to get words was from ‘kevins word list’ and I used the ‘Part Of Speech Database’ and edited the file so the program could read the last letter which shows what type of grammar it is.
http://www.mediafire.com/?py58v71b0p0sopu
Here is the legend to decode the letters at the end of the word:
N Noun P Plural h Noun Phrase V Verb (usu participle) t Verb (transitive) i Verb (intransitive) A Adjective v Adverb C Conjunction P Preposition ! Interjection r Pronoun D Definite Article I Indefinite Article o Nominative
I’m going to upload both the source and the file that has the list of words, but there’s only one upload per post so I will post again after this to upload the text file the program uses and needs to run.
File Attachments
|
|
|
|
|
Posted: Jan 4, 2012 |
[ # 83 ]
|
|
Experienced member
Total posts: 46
Joined: Dec 17, 2011
|
And here’s the text file.
So I said that I wanted to do work with grammar so I got the text file which has the grammar and put grammar into my code.
Now the result, the words below the percenteges, isn’t fluent english and is barely a sentence, it’s a pretend sentence, but it shows grammar in the words that are generated.
I suppose if somebody was industrious they could scale it up to sophistication.
Now I’ll think about my work so far then think if I can add anything else or should add anything else.
i did this new code because I wanted the output to be more valuable, I hope it is. Try the program out yourself by downloading the program Ilinked to in my previous post and post your results, both good and bad results please.
Thanks for helping me out and critiquing my program so far.
The files too large, you have to get it from the link in the previous post.
|
|
|
|
|
Posted: Jan 4, 2012 |
[ # 84 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
Abyssinian banana????
It doesn’t seem to be getting any better Jeremy.
|
|
|
|
|
Posted: Jan 5, 2012 |
[ # 85 ]
|
|
Senior member
Total posts: 250
Joined: Oct 29, 2011
|
Jeremy,
I like your spunk. I am sure at some point you may actual get somewhere with all of this, but I think what Steve is suggesting in using a thesaurus is certainly reasonable and is a superior approach to reinventing the wheel.
|
|
|
|
|
Posted: Jan 5, 2012 |
[ # 86 ]
|
|
Experienced member
Total posts: 46
Joined: Dec 17, 2011
|
Here are the new results:
Input a sentence. Press Enter when done.
German authorities apparently use silent SMS to create a movement profile of sus pects or locate their position. SMS pings are received by a cellphone, but the u ser will not be notified of it. However, the cellphone carrier will record the d ata in a log, which can be requested by the government. While the data do not pr ovide information about the phone, they do deliver location data via the cell to wers that were used when the silent SMS was sent.
__________________ __________________
An input sentence is converted to lower case: __________________
german authorities apparently use silent sms to create a movement profile of sus pects or locate their position.
__________________
The secret message in the sentence: __________________
german authorities apparently use silent sms to create movement profile suspects locate their position
The last word is: position __________________
Analysis part one: __________________
letter vowel letter 0.571429 letter vowel vowel 0.214286 vowel vowel letter 0.071429 vowel vowel vowel 0.142857
Analysis part two: __________________
Using the last word of the sentence: position, these are four possible word associations:
its D
Int Rev h
amidst P
Death N
The result using Analysis part ones data is: Death N
_______________________________________________________________ _______________________________________________________________
__________________ __________________
An input sentence is converted to lower case: __________________
sms pings are received by a cellphone, but the user will not be notified of it.
__________________
The secret message in the sentence: __________________
but the not notified it
The last word is: it __________________
Analysis part one: __________________
letter vowel letter 0.400000 letter vowel vowel 0.400000 vowel vowel letter 0.200000 vowel vowel vowel 0.000000
Analysis part two: __________________
Using the last word of the sentence: it, these are four possible word associations:
its D
Phil I h
amidst P
Ibsenism N
The result using Analysis part ones data is: Ibsenism N
_______________________________________________________________ _______________________________________________________________
__________________ __________________
An input sentence is converted to lower case: __________________
however, the cellphone carrier will record the data in a log, which can be requ ested by the government.
__________________
The secret message in the sentence: __________________
however the cellphone carrier record the data in log can requested the governmen t
The last word is: government __________________
Analysis part one: __________________
letter vowel letter 0.538462 letter vowel vowel 0.384615 vowel vowel letter 0.076923 vowel vowel vowel 0.000000
Analysis part two: __________________
Using the last word of the sentence: government, these are four possible word associations:
her rD
GI tag h
among P
Covell N
The result using Analysis part ones data is: Covell N
_______________________________________________________________ _______________________________________________________________
__________________ __________________
An input sentence is converted to lower case: __________________
while the data do not provide information about the phone, they do deliver loca tion data via the cell towers that were used when the silent sms was sent.
__________________
The secret message in the sentence: __________________
the data not information about the phone they location data the towers that used when the silent sms was sent
The last word is: sent __________________
Analysis part one: __________________
letter vowel letter 0.450000 letter vowel vowel 0.400000 vowel vowel letter 0.100000 vowel vowel vowel 0.050000
Analysis part two: __________________
Using the last word of the sentence: sent, these are four possible word associations:
her rD
Ivan IV h
amongst P
Demus N
The result using Analysis part ones data is: Demus N
_______________________________________________________________ _______________________________________________________________
Press any key to continue . . .
I tweaked the code a bit. Here is the link to the new source and program:http://www.mediafire.com/?n6arkja5d33qkjd
I had to work on the results a bit to get it to look this good. Try the program and input your own sentences and post the results.
Hi Laura and Steve, I haven’t got around to implementing a thesaurus but I might in the future.
Is there a free thesaurus text file online?
Try my new program by using the link. Post your results.
I’ll upload the newest source.
File Attachments
|
|
|
|
|
Posted: Jan 5, 2012 |
[ # 87 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
After reading 4 screens full of nonsense output, your program appears to breaks down:
“German authorities apparently use silent SMS to create a movement profile of suspects or locate their position. SMS pings are received by a cellphone, but the user will not be notified of it. However, the cellphone carrier will record the data in a log, which can be requested by the government. While the data do not provide information about the phone, they do deliver location data via the cell towers that were used when the silent SMS was sent.”
into the non-word DEMUS???
I had to work on the results a bit to get it to look this good. Try the program and input your own sentences and post the results.
No thanks.
|
|
|
|
|
Posted: Jan 5, 2012 |
[ # 88 ]
|
|
Senior member
Total posts: 250
Joined: Oct 29, 2011
|
Jeremy reminds me of another member here that also gets pleasure from beating a dead horse (no name mentioned).
|
|
|
|
|
Posted: Jan 6, 2012 |
[ # 89 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Laura Patterson - Jan 5, 2012: Jeremy reminds me of another member here that also gets pleasure from beating a dead horse (no name mentioned).
That fits a couple of folks I could name, but won’t.
|
|
|
|
|
Posted: Jan 6, 2012 |
[ # 90 ]
|
|
Senior member
Total posts: 974
Joined: Oct 21, 2009
|
Dave Morton - Jan 6, 2012: Laura Patterson - Jan 5, 2012: Jeremy reminds me of another member here that also gets pleasure from beating a dead horse (no name mentioned).
That fits a couple of folks I could name, but won’t.
Then I’ll name them: Me
|
|
|
|