2017-10-08 12 views
1

봇에게 답변을 묻는 질문을하고 답장을 보내려고합니다. 문제는 임의의 무언가이며, '당신은 어떠세요?'로 끝납니다.을 AIML에 * 사용하여

<aiml version = "1.0.1" encoding = "UTF-8"> 
    <category> 
     <pattern>HI</pattern> 
     <template> 
      <random> 
       <li>Hi! How are you?</li> 
       <li>Hello there. How are you?</li> 
       <li>Greeings. And how are you?</li> 
      </random> 
     </template> 
    </category> 

    <category> 
     <pattern>GOOD</pattern> 
     <that>* how are you?</that> 
     <template>Happy to hear that.</template> 
    </category> 


    <category> 
     <pattern>*</pattern> 
     <template>Can you rephrase that?</template> 
    </category> 

</aiml> 

내가 '답장'하면 봇이 '답장할 수 있습니까?'라는 메시지를 이해하고 회신하지 않습니다.

+0

입력을 전달하기 위해이 AIML 파일을 파이썬 코드와 함께 사용하고 있습니까? –

답변

1

that 태그 안의 텍스트에서 물음표를 제거해보십시오. AIML 버전 1에서 모든 패턴과 '그'태그는 별 (*) 밑줄 (_) 또는 대문자로만 사용해야합니다. 대문자는 실제 요구 사항보다 관례입니다.