2017-03-06 58 views
0

可正常工作AIML與蟒紋不承認不深但承認請勿

<category> 
    <pattern>DO NOT CALL ME *</pattern> 
    <that>WHAT CAN I CALL YOU</that> 
    <template>So what can I call you?</template> 
    </category> 

這將引發無法比擬的錯誤

<category> 
     <pattern>DON'T CALL ME *</pattern> 
     <that>WHAT CAN I CALL YOU</that> 
     <template>So what can I call you?</template> 
    </category> 

我明明做一些愚蠢的事。任何人都知道嗎?

回答

1

由於'未被轉義,因此您認爲該錯誤是Python認爲該字符串在此處結束。
嘗試通過添加斜線\'轉義'

+0

changed 不要撥打我*。然後Python代碼是human_input = raw_input(「Enter your message >>」).replace(「\'',」「) print kernel.respond(human_input) – user3057416