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..

NESTING OF OPTIONAL CONCEPTS
 
 

Dear Bruce,

congratulations to your
winning of the loebner-price again: )

I am still working on possibilities
to convert my AIML-files in a way
which includes my own german concepts.

If you want to make it possible to match
none, one or more concepts with a keyword like in any order,
is it possible to do it in this way:

topic: ~ARCHITEKT[]
u: ( << Architekt* { ~occupation_artist_d ~house_d ~list_of_architects_d } >> ) xyz.

(I hope, “Architekt*” would match “Architektur” also.)

Is it ok like this?
Best

Andreas

 

 
  [ # 1 ]

When you use << >>, it means find these in any order.  WHen you use { } is means optionally find these in this position. BUT there is not position within << >> so { } has no real meaning. After all, it matters not in your pattern whenter the occupations are found or not.  IT WOULD be useful if you had put an underscore before the optional set, in which case it would say, find and memorize one of them if it can, though not finding them would not terminate the pattern.

So the question is what you are really meaning to match with your pattern.  What is a sample input you intended to catch that required your { } ..

 

 
  [ # 2 ]

Hi Bruce,

thank you for your answer.
I wanted to match user-outputs
with a part which would be necessaryl (“Architekt” = “architect” in my example)
and some other parts which would be optional like:
1)
German: “Um einen Wolkenkratzer zu bauen, braucht es mehr als einen Architekten!”
English translation: “To build a skyscraper (matched by ~house_d), you need more than one architect.
(in German matched by “Architekt”.)
2)
German: “Magst du Architektur (matched by Achitekt*) wie die von Gaudi (matched by ~list_of_architects)?”
English translation: “Do you like the architecture made by Gaudi?”
AND
3)
German: “Ein Architekt ist wie ein Musiker, der ein Haus komponiert, wie Frank Lloyd Wright.”
English translation: “An architect is like a musician, who composing a house, like Frank Lloyd Wright.”
(with matches the necessary part “Architekt*” and the optional part, the 3 concepts within {}.
But I think, it is much better to have 3 rules for it.
Especially, to find example 3 BEFORE the other 2, because everything in this pattern is matched?
Do you see it the same way?
Best
Andreas

 

 
  [ # 3 ]

the question is are you trying to find input which has 2 features- one is required - the architect - and one can come from multiple choices - specific architect, building reference. in which case
u; ( << architect [ ~building ~list_of_architects ] >>) 
would do it.

if you want efficiency and relatedness you could do
u: ( architect) refine()
  a: (~list_of_architect) ...
  a: (~buildings) ...
  a: ()  solitary reference to architect

 

 
  [ # 4 ]

I think I choose
“efficiency and relatedness”,
if there is a possibility to randomize a: () this way:
a: () [answer1 for example “Architecture would be nothing for me: Too much mathematics.][answer2][answer3]
I couldnĀ“t find out (reading the documentation-files) if it is possible.
Is it?

 

 
  [ # 5 ]

output randomization works on any rule type, so your example is fine.

 

 
  [ # 6 ]

Fine,
thank you for showing me the way: )

 

 
  login or register to react