PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Spelling suggestions with xml output?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spelling suggestions with xml output?

    Hi,

    Is it possible to get spelling suggestions returned as part of the xml output using the cgi version of the script? I've got the "Provide spelling suggestions when less than 5 results found" option ticked but I can't see any suggestions in the xml output.

  • #2
    Yes it should be possible. Here is some example XML output.

    Code:
     
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- Start of RSS feed -->
    <rss version="2.0" xmlns:opensearch="[URL]http://a9.com/-/spec/opensearch/1.1/[/URL]" xmlns:zoom="[URL]http://www.wrensoft/zoom/response/5.0/schema/[/URL]">
      <channel>
        <title>WrenSoft – Search this website</title>
        <link>http://www.wrensoft.com/search.php</link>
        <description>Search results for “blah”</description>
        <zoom:searchquery>zoom engine</zoom:searchquery>
        <zoom:searchcategory>All</zoom:searchcategory>
        <opensearch:totalResults>122</opensearch:totalResults>
        <opensearch:startIndex>21</opensearch:startIndex>
        <opensearch:itemsPerPage>10</opensearch:itemsPerPage>
        <opensearch:link rel="search"
    href="[URL]http://www.wrensoft.com/opensearchdescription.xml[/URL]" type="application/opensearchdescription+xml"/>
        <zoom:spelling>Bob</zoom:spelling>
        <zoom:spelling>bobby</zoom:spelling>
        <zoom:spelling>robert</zoom:spelling>
        <item>
           <zoom:recommended value=”yes” />
           <title>Zoom Product Page</title>
           <link>http://www.wrensoft.com/zoom/index.html</link>
           <description>Information on Zoom</description>
           <pubDate>Sun, 19 May 2002 15:21:36 GMT</pubDate>
        </item>
    ......
    Note the spelling suggestions,
    <zoom:spelling>Bob</zoom:spelling>

    Comment


    • #3
      Eliminating suggestions for noise words

      Thanks very much for that - I've now managed to get it working although for some reason it's offering me spelling suggestions for noise words in the search query. Is it possible to stop this happening?

      For example, if I search for the term restaurants in south london it offers me a suggestion of restaurants ian south london which is wrong as "in" is in the word skip list

      Comment

      Working...
      X