- trailing symbols should work now.
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@343
c11ca15a-4712-0410-83d8-
924469b57eb5
$in =~ s/\s+/ /g;
$in =~ s/^\s*(.*?)\s*$/$1/;
$in =~ s/\s+/ /g;
$in =~ s/^\s*(.*?)\s*$/$1/;
+ $in =~ s/^\s+|\s+$//g; # why twice, see Question.pl
if (!$addressed) {
return '' unless ($finalQMark);
return '' if (&IsParam("minVolunteerLength") == 0);
if (!$addressed) {
return '' unless ($finalQMark);
return '' if (&IsParam("minVolunteerLength") == 0);
- return '' if (length($query) < $param{'minVolunteerLength'});
+ return '' if (length $query < $param{'minVolunteerLength'});
} else {
### TODO: this should be caught in Process.pl?
return '' unless ($talkok);
} else {
### TODO: this should be caught in Process.pl?
return '' unless ($talkok);
push(@query, $query); # 1: push original.
push(@query, $query); # 1: push original.
+ # valid factoid.
+ if ($query =~ s/[!.]$//) {
+ push(@query,$query);
+ }
+
$x = &normquery($query);
push(@query, $x) if ($x ne $query);
$query = $x;
$x = &normquery($query);
push(@query, $x) if ($x ne $query);
$query = $x;
$questionWord = "where";
}
$questionWord = "where";
}
- # valid factoid.
- if ($query =~ s/[\!\.]$//) {
- push(@query,$query);
- }
-
for (my$i=0; $i<scalar(@query); $i++) {
$query = $query[$i];
$result = &getReply($query);
for (my$i=0; $i<scalar(@query); $i++) {
$query = $query[$i];
$result = &getReply($query);
- &DEBUG("Question: guessed factoid correctly ($i) => '$query'.");
+ &DEBUG("Question: '$query[0]' did not exist; '$query[$i]' ($i) did");