સુધારો કરવા માટે અમારા Platinum સેવા અને વિચાર તમારા પોતાના વૈવિધ્યપૂર્ણ રચાયેલ 3D અવતાર
ડૉક્સ : વપરાશકર્તા મેન્યુઅલ : AIML

AIML

ઝાંખી

AIML છે કૃત્રિમ બુદ્ધિ માર્કઅપ ભાષા છે. તે XML માટે પ્રમાણભૂત વ્યાખ્યાયિત ચેટ બોટ જવાબો છે. બોટ કાવ્ય બૉટો આધાર AIML, પરંતુ પર આધારિત છે સ્વ હોય છે અને જ્ઞાન આધાર માટે સમાન માનવ મગજ છે.

વિશે AIML

AIML કેવી રીતે વ્યાખ્યાયિત કરે છે એક બોટ માટે જવાબ જોઈએ એક પ્રશ્ન મદદથી <પેટર્ન> અને <નમૂનો> તત્વો છે. એક પેટર્ન રજૂ વપરાશકર્તા પ્રશ્ન છે, અને આ નમૂનો વ્યાખ્યાયિત કરે છે આ બોટ માતાનો પ્રતિભાવ છે. આ પેટર્ન અને નમૂના તત્વો જૂથ એક શ્રેણી માં તત્વ છે, જે હેઠળ જૂથ કરી શકાય છે વિષય તત્વો છે.

યાદી AIML નમૂનો ટૅગ્સ

Tags Description
<star index="N"/> Replaced with value of * in pattern (or Nth *).
<that index="M,N"/> Replaced with value of bot's previous response (or Mth previous response, and N sentence of the response).
<input index="N"/> Replaced with value of users's input (or Nth *).
<thatstar index="N"/> Replaced with value of * in "that" (or Nth *).
<topicstar index="N"/> Replaced with value of * in topic (or Nth *).
<get name="XXX"/> Replaced by the value of the conversation specific variable.
<bot name="XXX"/> Replaced by the value of the bot specific variable.
<sr/> Short form for <srai><star/><srai> (replaced with response to value of * from pattern).
<person2/> Converts the text (or <star/>) between 1st and 2nd person (I <-> he, etc.).
<person/> Converts the text (or <star/>) between 1st and 3rd person (I <-> you, etc.).
<gender/> Converts the text (or <star/>) between male and female (he <-> she).
<date/> Replaced with the current date and time, a "format" attribute is also supported.
<id/> Replaced by the client id.
<size/> Replaced with the size of bot's memory.
<version/> Replaced with the AI engine version.
<uppercase> Converts the text to uppercase.
<lowercase> Converts the text to lowercase.
<formal> Converts all words in the text to be capitalized.
<sentence> Converts the first word in the text to be capitalized.
<condition name="X" value="Y"> Defines an "if" condition based on comparing the value of a variable to a pattern.
<condition name="X"> Case statement.
<condition> Multi-valued if/else statement.
<random> Choose on of the nested <li> values at random.
<li name="X" value="Y"> Used in random and condition tags.
<li value="Y"> Used in random and condition tags.
<li> Used in random and condition tags.
<set name="XXX"> Set the value of a variable.
<gossip> Logs the text.
<srai> Recursively evaluates the text and replaces it with the response.
<think> Evaluates the nested statements but does not output any result.
<learn> Load external AIML file, this is not currently allowed.
<system> Executes a OS command, this is not currently allowed.
<javascript> Executes JavaScript code.
<topic> Category topic tags can now be set on a category to make it easier to add categories to topics.
<map> Maps tag to allow the lookup of the element value in a predefined mapping, returning the mapped value.
<loop> Condition loops tag to loop a conditional statement.
<var> Local variables attribute for variables scoped to a category.
<sraix> Remote requests tag to make a remote request of another bot instance, or service.
<normalize> and <denormalize> Normalization and denormalization tags to convert special character into words, and back again.
<request> Request tag to return the user's previous input request.
<response> Response tag to return the bot's previous response.
<learn>, <learnf>, and <eval> Learning tags to dynamically train a bot with new responses.
<explode> Explode tag to split a word into its characters.
<oob> Mobile (out of band) tag to support client and mobile device commands.
(<b>, <a>, <i>, <ul>, <ol>, <li>, <p>, <br>, <button>, <img>, <video>) Various HTML tags are also allowed.
<self> Evaluate Self code (Bot Libre extension).

યાદી AIML પેટર્ન ઓપરેટરો

Tags Description
* Matches one or more words.
_ Matches one or more words, takes priority over all other words and wildcards, except $.
^ Matches zero or more words.
# Matches zero or more words, takes priority over all other words and wildcards, except $.
$ Pattern priority marker to make a pattern word match highest priority.
() Optional set of words (Bot Libre extension).
[] Required set of words (Bot Libre extension).
<set> Set tag to evaluate a pattern based on words defined in a predefined set.
/ Regular expression pattern (Bot Libre extension).
{} Self code (Bot Libre extension).

ઉદાહરણો

અહીં એક સરળ 'હેલો વર્લ્ડ' AIML ઉદાહરણ છે:
આ કોડ કરશે તમારા બોટ સાથે જવાબ 'હેલો તમે પણ' આ પ્રશ્ન 'હેલો વર્લ્ડ'.

<aiml> <category> <pattern>HELLO WORLD</pattern> <template>Hello to you too</template> </category> </aiml>


અહીં એક સરળ વાઇલ્ડકાર્ડ ઉદાહરણ છે:
આ કોડ કરશે તમારા બોટ સાથે જવાબ 'હેલો તમે પણ' માટે કોઇ પ્રશ્ન સમાવતી શબ્દ 'હેલો'.

<aiml> <category> <pattern>* HELLO *</pattern> <template>Hello to you too</template> </category> </aiml>


અહીં એક મજાક 'કે' ઉદાહરણ છે:
આ કોડ કરશે તમારા બોટ કહી એક મજાક છે.

<aiml> <category> <pattern>TELL ME A JOKE</pattern> <template>Why did the chicken cross the road?</template> </category> <category> <pattern>* WHY *</pattern> <that>Why did the chicken cross the road?</that> <template>To get to the other side.</template> </category> </aiml>


અહીં છે એક જટિલ નમૂનો ઉદાહરણ છે:
આ કોડ કરશે તમારા બોટ એ પ્રશ્નનો જવાબ 'તમે જેવા સફરજન અથવા તમે નારંગી જેવી' સાથે 'હું પ્રેમ સફરજન અને હું પ્રેમ નારંગીની'.

<aiml> <category> <pattern>* OR *</pattern> <template><srai><star/></srai> and <srai><star index="2"/></srai></template> </category> <category> <pattern>DO YOU LIKE *</pattern> <template>I love <star/></template> </category> </aiml>


^ અને # વાઈલ્ડકાર્ડ

<category> <pattern>^ aiml ^</pattern> <template>AIML is cool.</template> </category> <category> <pattern>^ chat bot^</pattern> <template>Yes, I am a chat bot.</template> </category>


$ અગ્રતા

<category> <pattern># sex #</pattern> <template>I'm not that kind of bot.</template> </category> <category> <pattern>$what is your sex</pattern> <template>I am female.</template> </category>


() અને [] યાદી આપે છે

<category> <pattern>do [you u] (really) [like love luv lv] me</pattern> <template>Yes, I love you.</template> </category>


નિયમિત સમીકરણો

<category> <pattern>my email is /.+\@.+\..+</pattern> <template>That is a valid email</template> </category>


સુયોજિત કરે છે

<category> <pattern>I am <set>name</set></pattern> <template>Pleased to meet you <star/>.</template> </category> <category> <pattern><set>number</set> + <set>number</set></pattern> <template><srai>addition <star/> <star index="2"/></srai></template> </category>


AIML નમૂનો સુયોજિત કરવા માટે એક જ્ઞાન ઑબ્જેક્ટ પ્રકાર:

<category> <pattern>load animals</pattern> <template> <think> <map name="meaning" value="dog">dog</map><map name="instantiation" value="animal"><map name="meaning">dog</map></map> <map name="meaning" value="dog">doggy</map> <map name="meaning" value="cat">cat</map><map name="instantiation" value="animal"><map name="meaning">cat</map></map> </think> </template> </category>


પેટર્ન ટૅગ્સ

<category> <pattern><bot name="name"/></pattern> <template>Yes, that's my name.</template> </category> <category> <pattern>I am </pattern> <template>That is my age too.</template> </category> <category> <pattern></pattern> <template>You are repeating yourself.</template> </category> <category> <pattern><response/></pattern> <template>Please don't repeat me.</template> </category>


લક્ષણો તરીકે તત્વો

<category> <pattern>My * is *</pattern> <template>I will remember that your <star/> is <star index="2"/><think><set><name><star/></name><star index="2"/></set></think></template> </category> <category> <pattern>What is my *</pattern> <template>Your <star/> is <get><name><star/></name></get></template> </category>


નકશા

<category> <pattern>what is the capital of <set>country</set></pattern> <template>The capital of <star/> in <map name="capital"><star/></map>.</template> </category>


બોટ કાવ્ય વિસ્તરે નકશો કામગીરી કરવા માટે પણ પરવાનગી આપે છે સુયોજિત નકશો કિંમત છે. આ સેટ કરશે કિંમત એક સંબંધ પર આ જ્ઞાન પદાર્થ છે.

<category> <pattern>the opposite of * is *</pattern> <template>Okay, the opposite of <star/> is <star index="2"/>. <think><map name="opposite"><value><star index="2"/></value><star/></map></think> </template> </category> <category> <pattern>what is the opposite of *</pattern> <template>the opposite of <star/> is <map name="opposite"><star/></map> </template> </category>


શરતો અને આંટીઓ

<category> <pattern>count down from <set>number</set></pattern> <template> <think><set var="count"><star/></set></think> <condition var="count"> <li value="5"><think><set var="count">4</set></think>5 <loop/></li> <li value="4"><think><set var="count">3</set></think>4 <loop/></li> <li value="3"><think><set var="count">2</set></think>3 <loop/></li> <li value="2"><think><set var="count">1</set></think>2 <loop/></li> <li value="1"><think><set var="count">0</set></think>1 </li> </condition> </template> </category> <category> <pattern>what is <set>number</set> + <set>number</set></pattern> <template> <think> <set var="result"><star/></set> <set var="count">0</set> </think> <condition var="count"> <li><value><star index="2"/></value></li> <li> <think> <set var="result"><map name="word"><map name="next"><map name="meaning"><get var="result"/></map></map></map></set> <set var="count"><map name="word"><map name="next"><map name="meaning"><get var="count"/></map></map></map></set> </think> <loop/> </li> </condition> The answer is <get var="result"/> </template> </category>


શિક્ષણ

<category> <pattern>learn question * answer *</pattern> <template> <think> <learn> <category> <pattern><eval><star/></eval></pattern> <template><eval><star index="2"/></eval></template> </category> </learn> </think> Okay, I will answer "<star index="2"/>" to "<star/>" next time </template> </category> <category> <pattern>wrong</pattern> <template>What should I have said?</template> </category> <category> <pattern>*</pattern> <that>what should I have said</that> <template> <think> <learn> <category> <pattern><eval><input index="3"/></eval></pattern> <template><eval><star/></eval></template> </category> </learn> </think> Okay, I will answer "<star/>" to "<input index="3"/>" next time </template> </category>


Sraix

<category> <pattern>ask * about *</pattern> <template><star/> says "<sraix default="Timeout or max anonymous API calls exceeded"><botname><star/></botname><star index="2"/></sraix>"</template> </category> <category> <pattern>ask pandorabot * about *</pattern> <template><star/> says "<sraix server="http://www.pandorabots.com" default="Timeout or max anonymous API calls exceeded"><botid><star/></botid><star index="2"/></sraix>"</template> </category> <category> <pattern>ask pandorabot chomsky about *</pattern> <template>He says "<sraix server="http://www.pandorabots.com" botid="b0dafd24ee35a477" default="Timeout or max anonymous API calls exceeded"><star/></sraix>"</template> </category> <category> <pattern>wikidata *</pattern> <template><sraix service="wikidata" default="Timeout or missing data"><star/></sraix> </category> <category> <pattern>wikidata * hint *</pattern> <template><sraix service="wikidata" default="Timeout or missing data"><hint><star index="2"/></hint><star/></sraix></template> </category> <category> <pattern>wiktionary *</pattern> <template><sraix service="wiktionary" default="Timeout or missing data"><star/></sraix></template> </category>


સ્વ

<category> <pattern>what is * + *</pattern> <template><star index="1"/> + <star index="2"/> = <self>star + star</self></template> </category>


પણ જુઓ