This seems impressive, if you use the supplied sample
text and ask the questions suggested in the hint.
When you deviate from that, however, things get
weird. For example, with the same supplied sample
input, try asking these questions:
- What are posed?
- What is this program?
- Who is the author?
- What is NASA? (This is particularly amusing.)
- What answers questions?
Mild Spoiler:
As near as I can tell, it's just finding the sentence
with the largest number of words matching what you
asked, removing the words in your question, and
spitting back the rest of the sentence verbatim.
This is still better than Eliza, but not much.
Even better, feed it the info from the top of
this thread...
? What is the population of Sao Paulo?
With a more than 10.2 million Seoul capital South Korea world?s large
+st city in terms.
? What is the world's largest city in terms of population?
sh: -c: line 1: unexpected EOF while looking for matching `''
sh: -c: line 2: syntax error: unexpected end of file
;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|