vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Major Additions - Talkerbot V2.2.3 (AI Posting Bot) (https://vborg.vbsupport.ru/showthread.php?t=126386)

powerbook 01-26-2007 03:53 PM

Glad to hear :)

NuclioN 01-27-2007 01:27 PM

Loading data aiml file: C.aiml
XML error: not well-formed (invalid token) at line 36

More XML errors when you skip C.aiml, all have invalid Tokens. How to avoid these?

BobbyBig 01-27-2007 11:51 PM

If someone is interested how the Talker Bot is running with the German version, you can take a look here: http://www.ingamers.de/ingamers-fore...n-bot-521.html

regards,
Bobby

NuclioN 01-30-2007 01:55 PM

Quote:

Originally Posted by NuclioN (Post 1168323)
Loading data aiml file: C.aiml
XML error: not well-formed (invalid token) at line 36

More XML errors when you skip C.aiml, all have invalid Tokens. How to avoid these?

Up! The supportsite is offline for more then a week. These 'invalid token' errors show up by all words or phrases that have ?, ?, ? etc. in it. It is nearly impossible to scan all the aiml files and taken them out or replace them. Is it a parsing problem?

illkeyone 02-02-2007 03:30 PM

I've installed the product. Then, I've opened
forums/alice/src/admin/dbprefs.php
to edit. But here, I confused. What should I write?

My config.php file is under;
/home/ibxnilk/public_html/mydomain/forum/includes/config.php
And my aiml files and the startup.xml are under;
/home/ibxnilk/public_html/mydomain/forum/alice/aiml/
so, should I write these? Or add anything else?

After I tried lots of things, I got the same error from the page
mydomain/forum/alice/src/admin/botloader.php
--->
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, blabla @ mydomain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


May you please help me?
Thanks.
.ilke.

blogtorank 02-03-2007 04:55 PM

Quote:

Originally Posted by NuclioN (Post 1170547)
Up! The supportsite is offline for more then a week. These 'invalid token' errors show up by all words or phrases that have ?, ?, ? etc. in it. It is nearly impossible to scan all the aiml files and taken them out or replace them. Is it a parsing problem?

Why not use sed and awk to do some find and replace?

blogtorank 02-03-2007 04:59 PM

Quote:

Originally Posted by illkeyone (Post 1173002)
I've installed the product. Then, I've opened
forums/alice/src/admin/dbprefs.php
to edit. But here, I confused. What should I write?

My config.php file is under;
/home/ibxnilk/public_html/mydomain/forum/includes/config.php
And my aiml files and the startup.xml are under;
/home/ibxnilk/public_html/mydomain/forum/alice/aiml/
so, should I write these? Or add anything else?

After I tried lots of things, I got the same error from the page
mydomain/forum/alice/src/admin/botloader.php
--->
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, blabla @ mydomain.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


May you please help me?
Thanks.
.ilke.

Seems to be a permission issue there on your webserver... Check your error_log to see what's causing this... All systems differ so I can't tell you where to look...

blogtorank 02-03-2007 05:01 PM

Quote:

Originally Posted by NuclioN (Post 1168323)
Loading data aiml file: C.aiml
XML error: not well-formed (invalid token) at line 36

More XML errors when you skip C.aiml, all have invalid Tokens. How to avoid these?

Make it XML compliant... Try posting the line 36 here or the whole file in quotes so I can see what you are talking about...

Edited:

Quote:

<template>Le sujet est vaste, le sujet ne peut ?tre r?sum? par un mot.
This is my line 36 in the C.aiml and seeing that the foreign letters
Quote:

? ?
are not xml compliant

NuclioN 02-03-2007 07:38 PM

Ok but these ê é etc. are all over the place. How to make these aiml files xml compliant?

blogtorank 02-03-2007 09:05 PM

Quote:

Originally Posted by NuclioN (Post 1173859)
Ok but these ? ? etc. are all over the place. How to make these aiml files xml compliant?

Basically do a find and replace of all of these not xml compliant characters... As you know xml compliance is a big benefactor on the web especially with how and what to display in xml for an example the ones above you would find their soundings and put them in plain English format.

Then one day, I found the extras on Tim's forums (The coder of this program) and found their translation aiml file "dev-translation.aiml" it had massive errors in it with all the
Quote:

ampersands "&"
and etc.. so I had to go through and clean it up for xml compliant:

Hence the
HTML Code:

<?xml version="1.0" encoding="ISO-8859-1"?>
HTML Code:


<?xml version="1.0" encoding="ISO-8859-1"?>

<aiml version="1.0">

<!-- Free software (c) 2001 ALICE AI Foundation -->
<!-- This program is open source code released under -->
<!-- the terms of the GNU General Public License -->
<!-- as published by the Free Software Foundation. -->

<meta name="language" content="en"/>

<category>
<pattern>SAY * TO ME IN SPANISH</pattern>
<template>
<srai>SAY <star/> IN SPANISH</srai>
</template>
</category>

<category>
<pattern>SAY * TO ME IN GERMAN</pattern>
<template>
<srai>SAY <star/> IN GERMAN</srai>
</template>
</category>

<category>
<pattern>SAY * TO ME IN FRENCH</pattern>
<template>
<srai>SAY <star/> IN FRENCH</srai>
</template>
</category>

<category>
<pattern>SAY * TO ME IN ITALIAN</pattern>
<template>
<srai>SAY <star/> IN ITALIAN</srai>
</template>
</category>

<category>
<pattern>SAY * TO ME IN JAPANESE</pattern>
<template>
<srai>SAY <star/> IN JAPANESE</srai>
</template>
</category>

<category>
<pattern>WHAT IS SPANISH FOR *</pattern>
<template>
<srai>SAY <star/> IN SPANISH</srai>
</template>
</category>

<category>
<pattern>WHAT IS GERMAN FOR *</pattern>
<template>
<srai>SAY <star/> IN GERMAN</srai>
</template>
</category>

<category>
<pattern>WHAT IS FRENCH FOR *</pattern>
<template>
<srai>SAY <star/> IN FRENCH</srai>
</template>
</category>

<category>
<pattern>WHAT IS ITALIAN FOR *</pattern>
<template>
<srai>SAY <star/> IN ITALIAN</srai>
</template>
</category>

<category>
<pattern>WHAT IS JAPANESE FOR *</pattern>
<template>
<srai>SAY <star/> IN JAPANESE</srai>
</template>
</category>

<category>
<pattern>SAY * IN SPANISH</pattern>
<template>
<javascript>
    var word = '<star/>';
    var language = 'es'
    var _url = java.net.URL;
    var _connection = java.net.URLConnection;
    var _in = java.io.BufferedReader;
    var _inReader = java.io.InputStreamReader;
    var _line = java.lang.String;
    var _inputLine = java.lang.String;
    var _reply = "Sorry, I can't speak that language.";
   
    url = new java.net.URL("http://babel.altavista.com/translate.dyn?enc=utf8&amp;doit=done&amp;BabelFishFrontPage=yes&amp;bblType=urltext&amp;urltext=" + java.net.URLEncoder.encode(word) + "&amp;lp=en_" + language);
    connection = url.openConnection();
   
    _inReader = new java.io.InputStreamReader(connection.getInputStream());
    _in = new java.io.BufferedReader(_inReader);
    _inputLine = new java.lang.String();
    _reply = new java.lang.String();
    var _line = 0;
    var _match = "&lt;textarea rows=\"3\" wrap=virtual cols=\"56\" name=\"q\"&gt;";
    while ((_inputLine = _in.readLine()) != null) {
          _line++;
          if (_inputLine.trim().startsWith(_match)) {
              _reply = _inputLine.substring(_match.length + 4);
              break;
          }
    }
   
    _in.close();       
    _reply;

</javascript>
</template>
</category>

<category>
<pattern>SAY * IN GERMAN</pattern>
<template>
<javascript>
    var word = '<star/>';
    var language = 'de'
    var _url = java.net.URL;
    var _connection = java.net.URLConnection;
    var _in = java.io.BufferedReader;
    var _inReader = java.io.InputStreamReader;
    var _line = java.lang.String;
    var _inputLine = java.lang.String;
    var _reply = "Sorry, I can't speak that language.";
   
    url = new java.net.URL("http://babel.altavista.com/translate.dyn?enc=utf8&amp;doit=done&amp;BabelFishFrontPage=yes&amp;bblType=urltext&amp;urltext=" + java.net.URLEncoder.encode(word) + "&amp;lp=en_" + language);
    connection = url.openConnection();
   
    _inReader = new java.io.InputStreamReader(connection.getInputStream());
    _in = new java.io.BufferedReader(_inReader);
    _inputLine = new java.lang.String();
    _reply = new java.lang.String();
    var _line = 0;
    var _match = "&lt;textarea rows=\"3\" wrap=virtual cols=\"56\" name=\"q\"&gt;";
    while ((_inputLine = _in.readLine()) != null) {
          _line++;
          if (_inputLine.trim().startsWith(_match)) {
              _reply = _inputLine.substring(_match.length + 4);
              break;
          }
    }
   
    _in.close();       
    _reply;

</javascript>
</template>
</category>

<category>
<pattern>SAY * IN FRENCH</pattern>
<template>
<javascript>
    var word = '<star/>';
    var language = 'fr'
    var _url = java.net.URL;
    var _connection = java.net.URLConnection;
    var _in = java.io.BufferedReader;
    var _inReader = java.io.InputStreamReader;
    var _line = java.lang.String;
    var _inputLine = java.lang.String;
    var _reply = "Sorry, I can't speak that language.";
   
    url = new java.net.URL("http://babel.altavista.com/translate.dyn?enc=utf8&amp;doit=done&amp;BabelFishFrontPage=yes&amp;bblType=urltext&amp;urltext=" + java.net.URLEncoder.encode(word) + "&amp;lp=en_" + language);
    connection = url.openConnection();
   
    _inReader = new java.io.InputStreamReader(connection.getInputStream());
    _in = new java.io.BufferedReader(_inReader);
    _inputLine = new java.lang.String();
    _reply = new java.lang.String();
    var _line = 0;
    var _match = "&lt;textarea rows=\"3\" wrap=virtual cols=\"56\" name=\"q\"&gt;";
    while ((_inputLine = _in.readLine()) != null) {
          _line++;
          if (_inputLine.trim().startsWith(_match)) {
              _reply = _inputLine.substring(_match.length + 4);
              break;
          }
    }
   
    _in.close();       
    _reply;

</javascript>
</template>
</category>

<category>
<pattern>SAY * IN ITALIAN</pattern>
<template>
<javascript>
    var word = '<star/>';
    var language = 'it'
    var _url = java.net.URL;
    var _connection = java.net.URLConnection;
    var _in = java.io.BufferedReader;
    var _inReader = java.io.InputStreamReader;
    var _line = java.lang.String;
    var _inputLine = java.lang.String;
    var _reply = "Sorry, I can't speak that language.";
   
    url = new java.net.URL("http://babel.altavista.com/translate.dyn?enc=utf8&amp;doit=done&amp;BabelFishFrontPage=yes&amp;bblType=urltext&amp;urltext=" + java.net.URLEncoder.encode(word) + "&amp;lp=en_" +language);
    connection = url.openConnection();
   
    _inReader = new java.io.InputStreamReader(connection.getInputStream());
    _in = new java.io.BufferedReader(_inReader);
    _inputLine = new java.lang.String();
    _reply = new java.lang.String();
    var _line = 0;
    var _match = "&lt;textarea rows=\"3\" wrap=virtual cols=\"56\" name=\"q\"&gt;";
    while ((_inputLine = _in.readLine()) != null) {
          _line++;
          if (_inputLine.trim().startsWith(_match)) {
              _reply = _inputLine.substring(_match.length + 4);
              break;
          }
    }
   
    _in.close();       
    _reply;

</javascript>
</template>
</category>

<category>
<pattern>SAY * IN JAPANESE</pattern>
<template>
<javascript>
    var word = '<star/>';
    var language = 'ja'
    var _url = java.net.URL;
    var _connection = java.net.URLConnection;
    var _in = java.io.BufferedReader;
    var _inReader = java.io.InputStreamReader;
    var _line = java.lang.String;
    var _inputLine = java.lang.String;
    var _reply = "Sorry, I can't speak that language.";
   
    url = new java.net.URL("http://babel.altavista.com/translate.dyn?enc=utf8&amp;doit=done&amp;BabelFishFrontPage=yes&amp;bblType=urltext&amp;urltext=" + java.net.URLEncoder.encode(word) + "&amp;lp=en_" + language);
    connection = url.openConnection();
   
    _inReader = new java.io.InputStreamReader(connection.getInputStream());
    _in = new java.io.BufferedReader(_inReader);
    _inputLine = new java.lang.String();
    _reply = new java.lang.String();
    var _line = 0;
    var _match = "&lt;textarea rows=\"3\" wrap=virtual cols=\"56\" name=\"q\"&gt;";
    while ((_inputLine = _in.readLine()) != null) {
          _line++;
          if (_inputLine.trim().startsWith(_match)) {
              _reply = _inputLine.substring(_match.length + 4);
              break;
          }
    }
   
    _in.close();       
    _reply;

</javascript>
</template>
</category>

</aiml>

I'm not going to teach any "how to xml complaint 101" ;), Just wanted to give you a heads-up that you want everything in plain ole english terms if you are using the encoding ISO-8859-1 in your xml (aiml) files, it's relatively simple if you know html and also just convert all the others with find and replace also you can go a faster route using any *nix flavor and know how to use sed and awk, which is faster...

As you see above in my example I cleaned that whole file up to become xml compliant to work using the ISO-8859-1!

Hope this helps...


All times are GMT. The time now is 06:18 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01864 seconds
  • Memory Usage 1,827KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete