我正在使用AI::ExpertSystem::Advanced
从 Web 内容运行专家系统。
我有一个网站,我在其中使用以下代码运行 Perl 脚本:
use strict;
use warnings;
use AI::ExpertSystem::Advanced;
use AI::ExpertSystem::Advanced::KnowledgeDB::Factory;
use Data::Dumper;
use File::Slurp;
open(LOG, ">C:\\xampp\\htdocs\\xampp\\bc\\log.txt");
print LOG "START EXPERT\n";
system("C:\\Perl\\bin\\perl C:\\xampp\\htdocs\\xampp\\bc\\create_yaml.pl");
print LOG "START CREATE DB\n";
my $yaml_kdb = AI::ExpertSystem::Advanced::KnowledgeDB::Factory->new('yaml', {
filename => 'C:\\xampp\\htdocs\\xampp\\bc\\recepty.yaml'
});
print LOG "LOAD RECEPTY\n";
my $text = read_file(
'C:\\xampp\\htdocs\\xampp\\bc\\knowledgebase.yaml',
array_ref => 1,
chomp => 1
);
print LOG "LOAD DB\n";
my $ai = AI::ExpertSystem::Advanced->new(
viewer_class => 'terminal',
knowledge_db => $yaml_kdb,
initial_facts => $text
);
print LOG "NEW ES\n";
$ai->mixed();
print LOG "RESULT DONE\n";
#$ai->summary();
close LOG;
我试图创建一个日志。当我在终端中运行此源时,我的日志已满,一切正常。但是当我从网络上运行它时,它出了点问题。我的日志文件只有:
START EXPERT
START CREATE DB
LOAD RECEPTY
LOAD DB
我认为创建新的专家系统是不好的。链接或者我不知道。你怎么看?
我的本地服务器错误:
Compilation failed in require at C:/Perl/lib/Term/ReadLine/Perl.pm line 65.
The system cannot find the path specified. Unable to get Terminal Size.
The Win32 GetConsoleScreenBufferInfo call didn't work.
The COLUMNS and LINES environment variables didn't work.
The resize program didn't work. at C:/Perl/lib/Term/ReadKey.pm line 362.
Compilation failed in require at C:/Perl/lib/Term/ReadLine/Perl.pm line 65.