AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Pre-chatbot, it’s my syllogism program
 
 

My syllogism program is made in the c programming language. Normally syllogisms require twos sentences, but my program requires only one sentence.
It then creates the minor premise and the conclusion of the syllogism.

The program is built so that if the first answer it makes is wrong, you mark it zero and then try the syllogism again and it then gives you a different answer. You do this until your happy with the answer then you mark it one.

I made this program for my artificial intelligence project, but i don’t know what to do next. So I’m hoping by posting this you can try the program out and give me some ideas of what to do next with my program.

Here are some examples of the program running:

Type 1 to run the program
1


Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y




Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y

no gandalf is here

__________________________________________

Type Felapton 
(EAO-3) or Celarent (EAE-1) or Celaront (EAE-1Syllogism pattern
found
No M is P
S are M 
or M are S


Celarent

no gandalf is here
.
acidic are gandalf.
no acidic is here

Celaront

no gandalf is here
.
acidic are gandalf.
Some acidic are not here

Felapton

no gandalf is here
.
acidic are gandalf.
Some gandalf are not here

Was the syllogism logical
for yesfor no:
0
Close program
[1=yes0=no]0


Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y




Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y

no gandalf is here

__________________________________________

Type Felapton 
(EAO-3) or Celarent (EAE-1) or Celaront (EAE-1Syllogism pattern
found
No M is P
S are M 
or M are S


Celarent

no gandalf is here
.
accomplished are gandalf.
no accomplished is here

Celaront

no gandalf is here
.
accomplished are gandalf.
Some accomplished are not here

Felapton

no gandalf is here
.
accomplished are gandalf.
Some gandalf are not here

Was the syllogism logical
for yesfor no:
1
Close program
[1=yes0=no]1
Press any key to 
continue . . . 
Type 1 to run the program
1


Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y




Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y

no saint is here

__________________________________________

Type Felapton 
(EAO-3) or Celarent (EAE-1) or Celaront (EAE-1Syllogism pattern
found
No M is P
S are M 
or M are S


Celarent

no saint is here
.
abundant are saint.
no abundant is here

Celaront

no saint is here
.
abundant are saint.
Some abundant are not here

Felapton

no saint is here
.
abundant are saint.
Some saint are not here

Was the syllogism logical
for yesfor no:
1
Close program
[1=yes0=no]1
Press any key to 
continue . . . 

These are the names of the text files in the program that are in the same folder but blank:
backup.txt
readlist.txt
readtext1.txt
readtext.txt
writelist.txt
bad.txt
m_and_s.txt
readfile.txt

The file called “readfile.txt” is to hold the wordlist used in the search function.
You need this list to run the program.
You can get this list from sourceforge, google “kevins word list” and get the “Official 12Dicts Package”.
I use the file from the Official 12Dicts Package called “2 of 12”, I just copy and paste the list into the readfile.txt.

The uploaded source, Remove the txt extension and unzip the file to get the source.

So I made this now wonder how a chatbot could use it?

File Attachments
new.zip.txt  (File Size: 46KB - Downloads: 136)
 

 
  [ # 1 ]

How the program is structured is the input is one of a set of possible inputs.
The program then creates a numbers of different inputs and these are fed into another program which based on the input creates output syllogism conclusions.

The input has a M and P from the main syllogism, the new word in the minor syllogism is the variable S.
I theorize that if you base the M and P in the first sentence so if M is the word Name then P would be the name.
Likewise if you say a P is a M then ask what a P is it should say it is a M.

 

 
  [ # 2 ]

An example of using the syllogism S M P method:

Sentence 1: my name(m) is jeremy(p)
The machine is coded to do this: What is my(m) name(s)
When the machine gets the above sentence from the user input the reply then is this sentence: your name(m) is jeremy(p)

Note this is what I could now do with my program. What do you think?

 

 
  [ # 3 ]

I thought this up while I was waiting for a reply. Basically it creates a case to use the word list in the sentence generator.

___________________
The template begin:
___________________
defining the variable verb = am , are , is , are , was , were , was , were , being , been.
_________________________________
The input sentence from the user:
_________________________________

Define the pronoun) ‘pronoun’ ‘noun (m)’ ‘verb’ ‘noun complement (p)’

_____________________________________
The results generated by the program:
_____________________________________

question A) (who, what, where, when, why) ‘verb’ ‘pronoun’ ‘noun (m)’
question B) (who, what, where, when, why) ‘verb’ ‘noun complement (p)’

redefine pronoun A)  ‘pronoun’ ‘noun (m)’ ‘verb’ ‘noun complement (p)’
redefine pronoun B)  ‘noun complement (p)’ ‘verb’ ‘pronoun’ ‘noun (m)’

______________
/template end.
______________

example A of template being used:

Define pronoun) my name is Jeremy
question A) What is my name
redefine pronoun A) your name is Jeremy

example B of template being used:

Define pronoun) my name is Jeremy
question B) What is Jeremy
redefine pronoun B) Jeremy is your name.

_________________________
The program section begin
_________________________

The input provides the M and P.

The Program then fills in the templates below using the M and P from the user:

“What is my M”
“your M is P”

“What is P”
“P is your M”

Then I add this sentence:
What does M mean?

(Then I run the sentence generator and it pulls up some result from the word list which defines name.
Then I display the sentence that defines name. S is the word from the word list)
M is S
M are S
_________________________
/the Program section end.

Maybe I’ll do this next. What do you think of my syllogism program in the first post?

_________________________

 

 
  [ # 4 ]

I think I may be missing something. I was under the impression a syllogism would be something like:

User: Freddy is a dog.
Bot: Ok
User: All dogs have 4 legs.
Bot: So therefore Freddy has 4 legs.

Which is what a great deal of bots (including my own) can do already. I am unsure what you are trying to achieve with results such as:

no gandalf is here.
acidic are gandalf.
Some acidic are not here

Where did the “acidic” part come from?

My apologies if I am missing the point.

 

 
  [ # 5 ]

That result with the word acidic is marked zero, then when the input is given the result is different, it’s accomplished I think. yeah, it’s changed from the word ‘acidic’ to ‘accomplished’.

Then every time you enter that sentence it return the word accomplished in it’s syllogism sentences.

So a syllogism has a main premise and a minor premise and three variables, A B C.
The main premise uses two of the variables and the minor premise uses two of the variables, and the one variable is used in both the main and minor premise.

That is what I have as my syllogism results.
The terms camestros etc come from the Wikipedia site that defines syllogism types.
it’s there that I got the syllogism formula printed above the syllogism sentences.

The point is that from one sentence the user inputs you get the entire syllogism, and it’s not based on user defining the minor premise, the program uses a word list and code to define the minor premise and if the syllogism makes sense then the program made the minor premise properly and you mark the result as one.

 

 
  [ # 6 ]

Here’s two more examples:

Type 1 to run the program
1


Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y




Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y

no man is here

__________________________________________

Type Felapton 
(EAO-3) or Celarent (EAE-1) or Celaront (EAE-1Syllogism pattern
found
No M is P
S are M 
or M are S


Celarent

no man is here
.
administer are man.
no administer is here

Celaront

no man is here
.
administer are man.
Some administer are not here

Felapton

no man is here
.
administer are man.
Some man are not here

Was the syllogism logical
for yesfor no:
1
Close program
[1=yes0=no]0


Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y




Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y

no sun is here

__________________________________________

Type Felapton 
(EAO-3) or Celarent (EAE-1) or Celaront (EAE-1Syllogism pattern
found
No M is P
S are M 
or M are S


Celarent

no sun is here
.
unapproachable are sun.
no unapproachable is here

Celaront

no sun is here
.
unapproachable are sun.
Some unapproachable are not here

Felapton

no sun is here
.
unapproachable are sun.
Some sun are not here

Was the syllogism logical
for yesfor no:
1
Close program
[1=yes0=no]1
Press any key to 
continue . . . 
 

 
  [ # 7 ]

Hi Jeremy, I think I get what you are trying to do but the verbosity of the output and the length of your messages is a bit disconcerting. It would be good if your descriptions and printouts could be more concise. Is this interpretation correct?

1. You take a sentence that has been written in one of a small number of syllogistic formats.
2. You extract the words from the positions corresponding to the variables of the syllogism.
3. You construct possible minor premises using the variables and a random word and ask if they are valid or not.

I can think of three things that you could do next to make it more interesting, and possibly even more useful.

One would be to be allow phrases to be used as variables. (e.g. all black dogs are hard to see)

Another would be to have the program remember everything that you have entered previously (both syllogisms and answers) so that it would be able to learn. Maybe it does this already, but I am not sure from your description how you are using the information if it does.

A third possibility would be to accept syllogisms expressed as either singular or plural. (e.g. a black dog is hard to see, all black dogs are hard to see.)

Hope this helps, and whatever else happens, keep trying and never give up.

 

 
  [ # 8 ]

After 4 or 5 wrong answers I got this for the word ‘dogs’:

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y

no dogs is here

__________________________________________

Type Felapton 
(EAO-3) or Celarent (EAE-1) or Celaront (EAE-1Syllogism pattern
found
No M is P
S are M 
or M are S


Celarent

no dogs is here
.
openeyed are dogs.
no openeyed is here

Celaront

no dogs is here
.
openeyed are dogs.
Some openeyed are not here

Felapton

no dogs is here
.
openeyed are dogs.
Some dogs are not here

Was the syllogism logical
for yesfor no

And this one was for the word ‘black’, it took 8 or so wrong answers to get this result:

Enter a sentenceall lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y

no black is here

__________________________________________

Type Felapton 
(EAO-3) or Celarent (EAE-1) or Celaront (EAE-1Syllogism pattern
found
No M is P
S are M 
or M are S


Celarent

no black is here
.
aboriginal are black.
no aboriginal is here

Celaront

no black is here
.
aboriginal are black.
Some aboriginal are not here

Felapton

no black is here
.
aboriginal are black.
Some black are not here

Was the syllogism logical
for yesfor no

I think in order for the program to learn I will need to qualify words.
So instead of no M is P, it will be no M1 M2 is P, where M2 is defined by the random word, M1 qualifies M2.
Then in a text file there can be a list of P that define M1 + M2.

I’ll have to think about it to be sure though, but thanks for the ideas.

 

 
  [ # 9 ]

Sorry, it must be me. I really can’t see what you are trying to do. In your example, you say:

no dogs is here.
openeyed are dogs.
Some openeyed are not here

Despite the poor grammar, if openeyed is a dog then surely ALL openeyeds are not here?
Let’s rephrase your output like so:

No dogs are here
Poodles are dogs
Some poodles are not here.

This may make it easier to see that all poodles cannot be here, as they are dogs.

 

 
  [ # 10 ]

So thought in word is similar to a syllogism in that it has sections that have value.
Each of these sections are not limited to only one word though.

Sections: M1 (noun), M2 (noun complement), verb, P (noun complement).

An example, M1 M2 and P are single words:

sentence 1.) M1 M2 is P
sentence 2.) M2 is S1
(S1 expands the definition of M1. The random word generator uses M1 to create the S1 word.)
sentence 3.) S1 M2 is S2
(S2 expands the definition of P. The random word generator uses P to create the S2 word.)

I can ask the user to input a sentence with the format “M1 M2 is P”, or “No M1 M2 is P”, and then create some sort of file that stores this information.

The easiest method I can think of is there is a list:
M2 S1
P S2

If I have more than one result for S1 or S2, it would look like this
M2 S1
M2 S1
M2 S1

P S2
P S2
P S2

What I don’t know is why would I want the program to remember the list?
Can you give me some examples of what you were thinking when you said the program should remember please?

And to the other fellow, I updated my code and got the following result on my ninth try:

no dog is here

__________________________________________

Type Felapton 
(EAO-3) or Celarent (EAE-1) or Celaront (EAE-1Syllogism pattern
found
No M is P
S are M 
or M are S


Celarent

no dog is here
.
bloodhound are dog.
no bloodhound is here

Celaront

no dog is here
.
bloodhound are dog.
Some bloodhound are not here

Felapton

no dog is here
.
bloodhound are dog.
Some dog are not here

Was the syllogism logical
for yesfor no

I’ll upload my newest source that gave this result. Just remove the txt extension and unzip it.

File Attachments
new.zip.txt  (File Size: 46KB - Downloads: 107)
 

 
  [ # 11 ]

“no dog is here.
bloodhound are dog.
Some dog are not here”

Surely, ALL dogs are not here? The middle sentence is irrelevent.

 

 
  [ # 12 ]

Hi Mr.Steve, I will re-upload the newest source.

Here are the new results:

Type 1 to run the program
1


Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y


no bad is here

__________________________________________

Type Celarent 
(EAE-1) or Celaront (EAE-1Syllogism pattern

No M is P
S are M


Celarent

no bad is here
.
backstabber are bad.
no backstabber is here

Celaront

no bad is here
.
backstabber are bad.
Some backstabber are not here

__________________________________________


Was the syllogism logical
for yesfor no1
Close program
for yesfor no0



Enter a sentence
all lower case.
Rename X and Y with wordsthe new word must have both a letter and vowel in it.

Formats of sentences:

A.)X are Y
B
.)no X is Y
C
.)some X are not Y


no dog is here

__________________________________________

Type Celarent 
(EAE-1) or Celaront (EAE-1Syllogism pattern

No M is P
S are M


Celarent

no dog is here
.
bloodhound are dog.
no bloodhound is here

Celaront

no dog is here
.
bloodhound are dog.
Some bloodhound are not here

__________________________________________


Was the syllogism logical
for yesfor no1
Close program
for yesfor no1

Press any key to 
continue . . . 

 

File Attachments
new.zip.txt  (File Size: 46KB - Downloads: 114)
 

 
  [ # 13 ]

No, it is still wrong:

no dog is here.
bloodhound are dog.
Some bloodhound are not here

If bloodhounds are dogs then ALL bloodhounds are not here.

 

 
  [ # 14 ]

Well that’s the way it is on Wikipedia.  I think it should be “Some dogs are not here”, not “No dogs are here”.
But that would gimp up the way Wikipedia wrote the syllogism should be.
The thing is if I start to make them up I have to have the Venn diagram math to back it up.

 

 
  [ # 15 ]

Ok, let’s assume there is a room in which no dogs are in it. A bloodhound is a dog, so there are NO bloodhounds in the room. I wouldn’t believe all you read on Wikipedia.

 

 1 2 3 >  Last ›
1 of 9
 
  login or register to react
‹‹ MALDIX      SMS ChatBot ››