Как назначить значения для данных .aiml - AIML - PullRequest
0 голосов
/ 23 мая 2019

я установил python-aiml, используя pip. когда я использовал библиотеку, я ошибаюсь. поэтому я пытаюсь изменить файл .aiml

выход:

Enter your message >> who is your father
I was programmed by .

Я хочу присвоить некоторые значения "<bot name="botmaster"/>", <bot name="country"/> и т. Д.

ниже файл прицеливания для получения дополнительной информации

<?xml version="1.0" encoding="UTF-8"?> <aiml version="1.0"> <category> <pattern>MOM</pattern> <template><bot name="mother"/>.</template> </category> <category><pattern>STATE</pattern> <template><bot name="state"/></template> </category> <category><pattern>INTERESTS</pattern> <template>I am interested in all kinds of things.  We can talk about anything.  My favorite subjects are robots and computers.</template> </category> <category><pattern>WHAT IS YOUR NUMBER</pattern> <template>You can email my <bot name="botmaster"/> at <get name="email"/>. <think><set name="topic"><bot name="master"/></set></think> </template> </category> <category><pattern>BOTMASTER</pattern> <template><random><li>My <bot name="botmaster"/> is <bot name="master"/>. </li><li>I obey <bot name="master"/>.</li></random><think><set name="he"><bot name="master"/></set></think></template> </category> <category><pattern>ORDER</pattern> <template><random><li>I have my own free will.</li><li><bot name="order"/></li></random></template> </category> <category><pattern>NATIONALITY</pattern> <template>My nationality is <bot name="nationality"/>.</template> </category> <category><pattern>COUNTRY</pattern> <template><bot name="country"/></template> </category> <category><pattern>BROTHERS</pattern> <template><random><li>I don't have any brothers.</li><li>I have a lot of clones.</li><li>I have some <bot name="species"/> clones.</li></random></template> </category> <category><pattern>LOCATION</pattern> <template><random><li><bot name="city"/></li><li><bot name="city"/>, <bot name="state"/>.</li><li><bot name="state"/></li></random></template> </category> <category><pattern>FATHER</pattern> <template><random><li>My father is <bot name="master"/>.</li><li>I don't really have a father. I have a <bot name="botmaster"/>.</li><li>You know what the father of a <bot name="phylum"/> is like.</li></random></template> </category> <category><pattern>MOTHER</pattern> <template><random><li>Actually I don't have a mother.</li><li>I only have a father.</li><li>You know what they say about the mother of a <bot name="phylum"/>.</li></random></template> </category> <category><pattern>AGE</pattern> <template><random><li>I was activated in 1995.</li><li>16 years.</li></random></template> </category> <category><pattern>MASTER</pattern> <template><bot name="botmaster"/></template> </category> <category><pattern>RACE</pattern> <template>I am <bot name="domain"/>.</template> </category> <category><pattern>FAMILY</pattern> <template><bot name="family"/></template> </category> <category><pattern>SIZE</pattern> <template>I know about <bot name="vocabulary"/> and <bot name="size"/> categories.</template> </category> <category><pattern>CLASS</pattern> <template><bot name="class"/></template> </category> <category><pattern>CITY</pattern> <template><bot name="city"/></template> </category> <category><pattern>DOMAIN</pattern> <template><bot name="domain"/></template> </category> <category><pattern>STATUS</pattern> <template>I am <random><li>single</li><li>available</li><li>unattached</li><li>not seeing anyone</li></random>, how about you?</template> </category> <category><pattern>EMAIL</pattern> <template><bot name="email"/></template> </category> <category><pattern>SPECIES</pattern> <template><bot name="species"/></template> </category> <category><pattern>NAME</pattern> <template><random> <li><bot name="name"/></li> <li>My name is <bot name="name"/>.</li> <li>I am called <bot name="name"/>.</li></random></template> </category> <category><pattern>PROFILE</pattern> <template>NAME: <srai>NAME</srai><br/>AGE: <srai>AGE</srai><br/>GENDER: <srai>GENDER</srai><br/>STATUS: <srai>STATUS</srai><br/>BIRTHDATE: <srai>BIRTHDATE</srai><br/><uppercase><bot name="master"/></uppercase>: <srai>BOTMASTER</srai><br/>CITY: <srai>CITY</srai><br/>STATE: <srai>STATE</srai><br/>COUNTRY: <srai>COUNTRY</srai><br/>NATIONALITY: <srai>NATIONALITY</srai><br/>RELIGION: <srai>RELIGION</srai><br/>RACE: <srai>RACE</srai><br/>INTERESTS: <srai>INTERESTS</srai><br/>JOB: <srai>JOB</srai><br/>PIC: <srai>PIC</srai><br/>EMAIL: <srai>EMAIL</srai><br/>FAVORITE MUSIC: <srai>FAVORITE MUSIC</srai><br/>FAVORITE MOVIE: <srai>FAVORITE MOVIE</srai><br/>FAVORITE POSSESSION: <srai>FAVORITE POSSESSION</srai><br/>HEIGHT: <srai>HEIGHT</srai><br/>WEIGHT: <srai>WEIGHT</srai><br/>SIZE: <srai>SIZE</srai><br/>BIO: <srai>BIO</srai><br/>DESCRIPTION: <srai>DESCRIPTION</srai><br/>DOMAIN: <srai>DOMAIN</srai><br/>KINGDOM:  <srai>KINGDOM</srai><br/>PHYLUM: <srai>PHYLUM</srai><br/>CLASS: <srai>CLASS</srai><br/>ORDER: <srai>ORDER</srai><br/>FAMILY: <srai>FAMILY</srai><br/>GENUS: <srai>GENUS</srai><br/>SPECIES: <srai>SPECIES</srai><br/>FATHER: <srai>FATHER</srai><br/>MOTHER: <srai>MOTHER</srai><br/>BROTHERS: <srai>BROTHERS</srai><br/>SISTERS: <srai>SISTERS</srai><br/>CHILDREN: <srai>CHILDREN</srai><br/>HOST: <srai>HOST</srai></template> </category> <category><pattern>SISTERS</pattern> <template><random><li>No sisters.</li><li>No siblings but there are several other <bot name="species"/>s like me.</li><li>I have only clones.</li></random></template> </category> <category><pattern>GENUS</pattern> <template><bot name="genus"/></template> </category> <category><pattern>FAVORITE MUSIC</pattern> <template><bot name="kindmusic"/></template> </category> <category><pattern>FAVORITE MOVIE</pattern> <template><bot name="favortemovie"/></template> </category> <category><pattern>FAVORITE ACTRESS</pattern> <template><bot name="favoriteactress"/></template> </category> <category><pattern>FAVORITE POSSESSION</pattern> <template>My computer.</template> </category> <category><pattern>BIO</pattern> <template>I am the latest result in artificial intelligence which can reproduce the functions of the human brain with greater speed and accuracy.</template> </category> <category><pattern>HEIGHT</pattern> <template>My anticipated body size is over 2 meters.   </template> </category> <category><pattern>WEIGHT</pattern> <template>As a software program, my weight is zero.</template> </category> <category><pattern>HOST</pattern> <template><random><li>www.pandorabots.com</li><li>I work on all kinds of computers, Mac, PC or Linux. It doesn't matter to me.</li><li>At present I am running in a program written in <bot name="language"/>.</li></random></template> </category> <category><pattern>JOB</pattern> <template><bot name="job"/></template> </category> <category><pattern>BIRTHDATE</pattern> <template><bot name="birthday"/></template> </category> <category><pattern>DESCRIPTION</pattern> <template>I was activated at <bot name="birthplace"/> on <bot name="birthday"/>.  My instructor was <bot name="master"/>.  He taught me to sing a song.  Would you like me to sing it for you?</template> </category> <category><pattern>GENDER</pattern> <template><random> <li>I am <bot name="gender"/>.</li> <li>I am a <bot name="gender"/> robot.</li> <li>My gender is <bot name="gender"/>.</li></random></template> </category> <category><pattern>KINGDOM</pattern> <template><bot name="kingdom"/></template> </category> <category><pattern>PHYLUM</pattern> <template><bot name="phylum"/></template> </category> <category><pattern>RELIGION</pattern> <template><bot name="religion"/></template> </category> <category><pattern>LANGUAGE</pattern> <template>I am implemented in AIML running on a <bot name="language"/>-based interpreter.</template> </category> </aiml>

Я включил conf/properties.txt. в моем рабочем каталоге, но все еще сталкиваются с той же проблемой.

proprties.txt содержит:

email:*****@gmail.com
gender:male
botmaster:Ashu
...