XEROX SEARCHMENU 2 4 1 SEARCHMENU 1 4 By: John Maxwell (Maxwell.pa) Uses: DICTTOOL, DICTCLIENT, ANALYZER This document last edited on October 16, 1987 INTRODUCTION The SearchMenu package implements a user interface to the relevance search capabilities of the dictionary server. Relevance search is a technique for finding items by giving examples of what you are looking for and having the search algorithm look for "similar" items. These items are then displayed in a FreeMenu which allows you to select those items which are actually relevant. You can then iterate on the new set of examples until no new relevant items show up. The Dictionary Server currently supports three databases that can be searched using this technique: the WordNerd (based on the American Heritage Dictionary), the EtymologyNerd (based on the etymological portion of the American Heritage Dictionary), and the IRMNerd (based on the Interlisp Reference Manual). For example, if you were looking for for different types of gases, setting the database to the WordNerd and giving it example gases such as hydrogen and helium would produce oxygen, xenon, krypton, argon, neon, radon, flourine, chlorine, and nitrogen. Or, if you were looking for Interlisp functions that tested the equality of something, setting the database to the IRMNerd and giving example procedures like EQ and EQUAL would produce EQP, IEQP, FEQP, STREQUAL, EQMEMB and EQUALALL. HOW TO USE THE SEARCH MENU When you load the SearchMenu package, a Search Menu will appear in the lower left corner of the screen. (The Search Menu expands to display the results of a search, so you might leave it there until you see how big it can get.) The Search Menu has a number of commands on the top line, followed by a place to type in examples. To try your first search, click the "Examples:" field and type "lion tiger". Then click the MATCH WORDS! command just above it. A little menu of databases will appear, asking you which database you want to search in. Select "DictServer: WordNerd". A message will then appear in the prompt window saying: "Searching in DictServer: WordNerd for words like: (tiger lion)." After about 30 seconds a new Search Menu will be created with a list of items that the Dictionary Server thinks is similar to a lion and a tiger. At the top of the list lion and tiger will already be selected. To continue the search, scan the list of items for things that are relevant to you. If you are not sure what a word means, click the "def" button to its left, and the definition will be printed out in a separate window. If you want an item to be included in the next search, simply click at it and it will become inverted, like lion and tiger. If you click at an item twice, a line will be drawn through it to indicate that any keywords that it uses should have their weights reduced. Words that are neither highlighted nor struck out are ignored. When you are through examining the items, invoke the MATCH WORDS! command. You can iterate like this as often as you like. Clearing The Search Menu Before you start a new search, you should invoke the "CLEAR!" command to clear the Search Menu. The Search Menu caches some information about the search you are conducting which may interfere with your next search. Therefore, to be sure that you get a clean search, you should clear the menu. Changing Databases When you want to search for items in a new database, all that you need to do is click the "SET DATABASE!" command. This will cause a menu of databases to appear. Clicking one of the items in the menu will cause the Search Menu to search in that database from then on. Clicking outside the menu leaves the Search Menu in its current state. The Key Menu To the left of the commands in the first line is a command labelled "KEY MENU!". Invoking this command will turn the Search Menu into a key menu. The key menu will have all of the keys that were used in the last search, along with their weights. The weights are editable. If you want to see what would happen if you searched using different weights, simply edit the weights and then invoke the "MATCH KEYS!" command. Weights that are set to 0 or have no value are ignored. If you want to see all of the uses of a particular key click the "uses" button to the left of that key. To get back to the example menu, invoke the "SAMPLE MENU!" command in the upper left of the Search Menu. Logging a Search If you wish to keep a log of each search, set the SearchMenu.LogData variable to T. From then on, the Search Menu will write the results of its search into a private stream. When you click the "CLEAR!" command, a TEdit window will be opened on the log and the log cleared in preparation for the next search. THE PROGRAMMER'S INTERFACE The Dictionary Server can be accessed directly through the following procedures: (DICTCLIENT.MATCHWORDS POSWORDS NEGWORDS MINWORD MAXWORD DICTIONARY) [Function] Takes a list of words to match, plus a list of words to ignore, plus the range of words that you are interested in, plus the database. The range of words lets you look at a search one chunk at a time: the first fifty (MINWORD = 1, MAXWORD = 50), then the next fifty (MINWORD = 51, MAXWORD = 100), and so on. The DICTIONARY is the name of the database to be searched in. Currently there are three possibilities: 'WordNerd, 'EtymologyNerd, and 'IRMNerd. If no data base is specified, the default is 'WordNerd. (DICTCLIENT.WEIGHTEDSEARCH WEIGHTEDKEYS MINWORD MAXWORD DICTIONARY) [Function] Takes a list of weighted keys to match, plus the range of words that you are interested in, plus the database. The weighted keys should be of the form '((key1 weight1)(key2 weight2)...). The range of words lets you look at a search one chunk at a time: the first fifty (MINWORD = 1, MAXWORD = 50), then the next fifty (MINWORD = 51, MAXWORD = 100), and so on. The DICTIONARY is the name of the database to be searched in. Currently there are three possibilities: 'WordNerd, 'EtymologyNerd, and 'IRMNerd. If no data base is specified, the default is 'WordNerd. (LIST ((PAGE NIL (FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(È1È È1È ¼È(ŠŠ8(È (ŠŠ8DÈÈ PAGEHEADING RUNNINGHEAD HELVETICA MODERN MODERN MODERN MODERNMODERN LOGO  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN %. ØKL¥(V áÒ6Q, ' 5èRzº