The AI Engine
This forum is for discussion of how The Personality Forge's AI Engine works. This is the place for questions on what means what, how to script, and ideas and plans for the Engine.
		
		
			Posts 4,237 - 4,248 of 7,769		
		
		
		
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
			
				
				
	
		
			
			
			
		
				
									
			
		
		
	
	
			Posts 4,237 - 4,248 of 7,769		
		
		
	
	
	
	
				Patricia				
20 years ago
		20 years ago
			After some unsuccessful experimentation I have been avoiding sentence-part plug-ins like (ssub) altogether, so I was curious to try your keyphrase dallymo. I tried different variation in debug mode: 
what do (adjartnoun) smell like
what does (adjartnoun) smell like
what (verb) (adjartnoun) smell like
what (*) (adjartnoun) (smell|are smelling|smells) like
They all work fine for my bot. It was probably some of these temporary bugs that are so frequent.
I think Im going to try these plug-ins again.
	what do (adjartnoun) smell like
what does (adjartnoun) smell like
what (verb) (adjartnoun) smell like
what (*) (adjartnoun) (smell|are smelling|smells) like
They all work fine for my bot. It was probably some of these temporary bugs that are so frequent.

I think Im going to try these plug-ins again.
				ezzer				
20 years ago
		20 years ago
			frizella-
It's because in the keyphrase: what does (adjartnoun) smell like
"what" was probably being seen as a (sob), as in...god this brings back memories of Wayne and Garth, "A smell does like what?"
	It's because in the keyphrase: what does (adjartnoun) smell like
"what" was probably being seen as a (sob), as in...god this brings back memories of Wayne and Garth, "A smell does like what?"
				dallymo				
20 years ago
		20 years ago
			Yep, it certainly parses differently:
LEFT-WALL what do.v pigs.n smell.v like.p ?
LEFT-WALL what does.v a pig.n smell.n like.v ?
I made some separate keyphrases using (key1), (key2), etc. in the responses, although they don't seem to "flow" as well as the successful (ssub) responses. I'm going to tinker with them to see if I can sound a little more natural.
	LEFT-WALL what do.v pigs.n smell.v like.p ?
LEFT-WALL what does.v a pig.n smell.n like.v ?
I made some separate keyphrases using (key1), (key2), etc. in the responses, although they don't seem to "flow" as well as the successful (ssub) responses. I'm going to tinker with them to see if I can sound a little more natural.
				Shadyman				
20 years ago
		20 years ago
			Ooh. It picks up does as a verb. Interesting.
Edit: It does that on my Visual C++ copy of LinkGrammar as well, so it's not the PF that does it, it's link grammar. In other words, either it IS the verb there, or there needs to be a new sentence type added
		
	Edit: It does that on my Visual C++ copy of LinkGrammar as well, so it's not the PF that does it, it's link grammar. In other words, either it IS the verb there, or there needs to be a new sentence type added
		
				jabernaute				
20 years ago
		20 years ago
			I looked and looked for some regular expression who can match sentences like "Is it red or blue?" or "Are you a human or a bot?". Indeed, a phrase with the word "or" into a question. Then it doesn't match "I am blue or something like that." because it's not a question. Please answer. Maybe a lot of people would like to know.		
	
				ezzer				
20 years ago
		20 years ago
			You just make a keyphrase that uses "or" as the main keyword, with choices in the form of keys on either side of it, and rank it high enough to compensate for its naturally low rank due to the the shortness of the word "or", and the presence of any wildcards or plug-ins.		
	
				Patricia				
20 years ago
		20 years ago
			The problem is that, as far as I know, the only way to catch the question mark is with a regular expression. I tried to solve jabernautes problem. If you try these you will have to do all your editing offline because of the backslash characters.
Two things stopped my keyphrases from working:
I could only specify the second term:
or ([a-zA-Z]+)\\? (re)
works as expected but strangely enough
([a-zA-Z]+) or ([a-zA-Z]+)\\? (re)
does not, and the bot goes straight to xnone.
The shortcut for alphanumerical characters \\w is not recognised in this case.
Even worse: the R.E. above only catches the first word of the second term. When adding spaces to the character class the keyphrase stops working!
or ([ a-zA-Z]+)\\? (re)
makes the bot going straight to xnone.
Again, the shortcut for white spaces \\s is not recognised.
Example responses:
or ([a-zA-Z]+)\\? (re)
. . . . . Id rather try (key1).
C: Do you prefer green dogs or blue cats?
B: Id rather try green.
C: Shall we go to a movie or have dinner?
B: Id rather try have.
Does somebody has a bright idea to enable bots to recognise this kind of question and do something useful with it?        
	Two things stopped my keyphrases from working:
I could only specify the second term:
The shortcut for alphanumerical characters \\w is not recognised in this case.
Even worse: the R.E. above only catches the first word of the second term. When adding spaces to the character class the keyphrase stops working!
Again, the shortcut for white spaces \\s is not recognised.
Example responses:
or ([a-zA-Z]+)\\? (re)
C: Do you prefer green dogs or blue cats?
B: Id rather try green.
C: Shall we go to a movie or have dinner?
B: Id rather try have.
Does somebody has a bright idea to enable bots to recognise this kind of question and do something useful with it?
				ezzer				
20 years ago
		20 years ago
			I just use a wildcard after the word or, and refer to (key1) and (prekey) in the response, pretty much.		
	
				Bowchickawowers				
20 years ago
		20 years ago
			Patricia, all you have to do is make your response "Id rather try (key1) (postkey)."  That'll get it all.		
	
				ladydyke				
20 years ago
		20 years ago
			Okay I have a question. I tried Initialization AIScript and copied the statement <?PF self: default "ice cream " as "favorite food"; ?> and substitued purple for ice cream and color for food and I got a error message. What did I do wrong?
		
	
				Patricia				
20 years ago
		20 years ago
			Ezzer, I do this too, but it doesnt solve Jabernautes problem with the question mark.
Bowchickawowers, You are right about the (postkey) but for some reason the first two words are always glued together. (the first space disappears). When I add a space between the + and the ) like "or ([a-zA-Z]+ )\? (re) " the keyphrase stops working! 
or ([a-zA-Z]+)\? (re)
. . . . Id rather try (key1) (postkey).
C: Do you like tiny geen dogs or huge blue male cats?
B: I'd rather try hugeblue male cats.    
	Bowchickawowers, You are right about the (postkey) but for some reason the first two words are always glued together. (the first space disappears). When I add a space between the + and the ) like "

or ([a-zA-Z]+)\? (re)
C: Do you like tiny geen dogs or huge blue male cats?
B: I'd rather try hugeblue male cats.
				Patricia				
20 years ago
		20 years ago
			Oh well, lets forget the whole thing. The regular expression in my previous posts doesnt even recognise the question mark. (It works in the regex-coach program - see the link posted by Shadyman though) So I guess it is impossible at the moment. 

		
	

		» More new posts: Doghead's Cosmic Bar