Xwebster, A Dictionary Browser Niels P. Mayer Hewlett-Packard Laboratories Software & Systems Lab. Human-Computer Interaction Department. ------------------------------------------------------------------------------ Xwebster is used to look up words in the online copy of Webster's 7th dictionary, stored at SRI-NIC and also available on machines located at Boston U., Indiana U, Purdue U., MIT, Stanford, etc. In order to run xwebster you must have access to a webster server. In order to make xwebster run faster and more reliably (the "arpanet" can be flaky), you may want to ask your system administrators whether there is a webster server running locally. Chances are, if people at your site are using the tty-based webster(1) interface, there is probably a webster server "nearby". Using xwebster is simple -- words are typed into a TextEdit widget in xwebster, and then one of three actions can be taken: 1) mousing [Define] (or hitting ) after typing in a word will attempt to show you a complete dictionary entry for the word including definitions, pronunciation, and derivation. If the word is misspelled, then a browser of similar words will be presented. If the word contains wildcard characters (%=any char; *=any char seq), then a browser of all matching words will be presented. 2) mousing [Complete] (or hitting ) after a partial word has been typed will attempt to complete what you have typed so far. If what you have typed is a unique abbreviation for a word, the word is completed. Otherwise xwebster will beep and indicate the ambiguity of the partial word. 3) mousing [Endings] (or hitting ) after a partial word has been entered will display a browser of all the words matching the partial word. Anytime there are words in the word browser panel, clicking on a word will cause its definition to be dispayed. ---------- COMPILING: Xwebster expects to use the X11r4 HP Xwidgets library, libXw.a, and the corresponding X11R4 Xt intrinsics, libXt.a (with the latest patches). The HP widgets are on the X11R4 "contrib" distribution (under contrib/toolkits/Xw) and are also available via anonymous ftp from host expo.lcs.mit.edu, directory contrib, file Xw.tar.Z. The X11r4 Xt Intrinsics are on the MIT core distribution (under mit/lib/Xt/), and the patches are available on expo.lcs.mit.edu, directory pub/R4/fixes. Xwebster has been tested under HPUX 6.2, 6.5, 7.0 and SunOS... I've avoided any particularly hairy SYSVisms, so you sholdn't have any trouble getting it to run on your machine. You'll need the strtok() call - if your system doesn't have it (HPUX, System V, SunOS have it), get Henry Spencer's public domain strings(3) library from some comp.sources.unix archive site. A set of untested patches that people have sent me are in directory xwebster/patches. People should apply patches/patch-02, only if they are using a NeXT webster database server and want to access thesaurus mode. Note that patch-02 will probably break the application of patch-00 and patch-01. Likewise, applying patch-00 and patch-01 will probably break patch-02. ---------- TROUBLESHOOTING TIP (by Mark Moraes): > I am trying to run xwebster on a Sun 4/260 with output to an X-station. > Everything seems to work fine (I have a server configured and can reach > it). The problem is that I can't enter any words into the word box in > the middle. It just beeps. This is xwebster version 1.10. > > Do you know what could be wrong? Are you running a ICCCM-strict window manager like olwm? In that cause you may either need to set the XtNinput flag on xwebster (adding something like *input: True to the Xwebster app-defaults file should fix the problem. Alternative, you could make the window manager lenient if it permits that. ---------- CUSTOMIZING: All the resources for xwebster are specified in the application default file Xwebster.ad, which MUST be installed in APPDEFAULTSDIR/Xwebster. Fully qualified resource names are used in this app-defaults file so as to document the widget hierarchy in the application. Documentation on customizing xwebster also appears in this defaults file. (APPDEFAULTSDIR is set in the imake defaults, it is usually /usr/lib/X11/app-defaults/) Parameters for connecting to a webster server are contained in the resources "hostAddrList", "hostPort", and "hostServiceName". See the Xwebster.ad file for details and documentation. Xwebster allows dictionary definitions to be viewed in either a scrolled StaticText widget (for those who like scrollbars), or in a TextEdit widget (for those who like Emacs, and need better control of cut/paste operations). The resource that controls this is "useEditorAsDisplay" I personally use the following set of .Xdefaults for xwebster, in addition to the defaults provided by APPDEFAULTSDIR/Xwebster: # # Global Defaults. # *foreground: White *background: DarkSlateGray *font: 6x13 *Sash*background: wheat *Sash*foreground: black *topShadowColor: light blue *topShadowTile: foreground *bottomShadowColor: black *bottomShadowTile: foreground *TextEdit*background: IndianRed *TextEdit*foreground: Green *TextEdit*highlightThickness: 1 *TextEdit*font: fixed *StaticText*background: DarkSlateGray *StaticText*foreground: White *StaticText.BorderWidth: 1 *StaticText.ShadowOn: yes *StaticText*font: variable *PushButton*background: Blue *PushButton*foreground: White *PushButton*font: variable # # Xwebster # xwebster*hostAddrList: 26.0.0.73 10.0.0.51 xwebster*hostPort: 103 xwebster*useEditorAsDisplay: TRUE xwebster*highlightColor: white xwebster*highlightTile: foreground xwebster*display.foreground: White xwebster*display.background: IndianRed xwebster*word_input*foreground: Green xwebster*word_input*background: IndianRed ---------- HISTORY/THANKS/AUTHORS: This program was inspired by the webster(1) tty-based client to a webster server written by Dave Curry , although most of the code was written from scratch because I didn't find the webster(1) source code until after the application was prototyped. The original webster client/server was written in MIDAS and ran under Tops-20, it was probably done by someone at SRI-NIC. Xwebster was originally written and released by Niels Mayer on the X11r3 contrib tape. Mark Moraes took that version, updated it to work with the r3 HP Xwidgets and r3 Toolkit Intrinsics, and fixed a bunch of stupid bugs that were making xwebster dump core an a SUN. He also made xwebster disconnect gracefully after the webster dictionary server times out. Finally, he wrote up a manual page and put together an Imake file. Thanks Mark! -------------------- PS: If you have contributions to make to xwebster, please send them to me via email. Note however that I am supporting xwebster on a "time permitting" basis -- and for the past few years, time has not been permitting. PLEASE NOTE THAT REQUESTS FOR INFORMATION ON GETTING WEBSTER DATABASE SERVERS WILL BE CHEERFULLY IGNORED. FOR MORE INFORMATION ON WEBSTER DATABASE SERVERS, READ THE FOLLOWING USENET POSTINGS: ============================================================================== Path: hplabsz!hplabs!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!bloom-beacon!UMIACS.UMD.EDU!steve From: steve@UMIACS.UMD.EDU Newsgroups: comp.windows.x Subject: XWebster servers -- the whole story? Message-ID: <9011201440.AA29872@skippy.umiacs.UMD.EDU> Date: 20 Nov 90 14:40:09 GMT Sender: daemon@athena.mit.edu (Mr Background) Reply-To: steve@umiacs.umd.edu Organization: The Internet Lines: 51 [ *Please* reply directly to me -- there's no sense in rehashing this issue every six months! ] I brought this up with the editor of the Frequently-Asked Questions blurbs, and it seemed like there was some interest in clarifying the matter there. Since I guess I volunteered, I'd like to arrive at the One True Version of the facts, which we can then put in the FAQ sheet. So here's what I understand to be the case, and if you know differently, I'd appreciate your comments and corrections... Please do *not* take this as gospel (at least, not yet (-: ). Once upon a time, various sites (SRI, Boston University, and others) ended up with an online copy of some edition of Webster's Dictionary. This copy was somehow research-related; I gather that after the pertinent research was done, the sites involved were allowed to keep the online dictionary. However, Webster's still owns the copyright, and therefore thoses sites weren't allowed to redistribute the online copy. After a while, someone decided that it would be a neat hack to have a webster server running -- you'd fire off a query of some sort, and you'd get back a set of responses, straight from the horse's mouth. (I agree that this is a neat hack, for what that's worth.) There wasn't a whole lot of security designed into the system, so while the initial set of people using the servers was pretty small (and confined to the sites with the legal right to use the dictionary), word eventually got out, and people started writing software to use the webster servers. Eventually (as xwebster and the gnumacs webster hacks started spreading like wildfire), the folks at Webster's realized what was going on, and asked the sites running webster servers to cease doing so. These sites would continue to be allowed to use the dictionary at their own sites, but were not allowed to let others do so. Also for what it's worth, lest someone decide to hack out a server that runs on NeXT machines (which also come with Webster's online), I think I heard somewhere that one can access any NeXT-resident copy of Webster's from any machine licensed for the online Webster's -- which pretty much means from any NeXT machine. So if you're looking for a Webster server, you're probably out of luck, and if you find one, you're probably doing something illegal. Should a *provably legal* Webster server exist somewhere, and should the providers of that service not mind the extra load of providing that service to possibly many people, I'd love to know about it; lots of people here screamed bloody murder when we yanked our webster software, and I'm sure that they (and I) would like to have it back. For that matter, if you know what it takes to get an online copy *legally*, it might be worth putting that into the FAQ, too. -Steve Spoken: Steve Miller Domain: steve@umiacs.umd.edu UUCP: uunet!mimsy!steve Phone: +1-301-405-6736 USPS: UMIACS, Univ. of Maryland, College Park, MD 20742 ============================================================================== Path: hplabsz!hplabs!ucbvax!ucsd!usc!apple!hercules!sparkyfs!davy From: davy@sparkyfs.istc.sri.com (David Curry) Newsgroups: comp.windows.x Subject: Re: xwebster server Message-ID: <32543@sparkyfs.istc.sri.com> Date: 9 Aug 90 16:02:27 GMT References: <5751@hplabsz.HPL.HP.COM> Reply-To: davy@intrepid.itstd.sri.com.UUCP (David Curry) Distribution: comp.windows.x Organization: SRI International, Menlo Park, CA 94025 Lines: 70 I suppose, being the author of the UNIX version of the webster client/server, that I should stick my nose into this and clear up some of the confusion. Whoever maintains the "commonly asked questions" document might want to consider adding this information. The query seems to reappear every couple of months. The following is what I sent out a few years ago to holders of the dictionary who are/were using the dictionary: ---------------- November 25, 1987 This is Webster's 7th Collegiate Dictionary. It is Copyright (C) 1963 by Merriam-Webster, Inc. The machine-readable version of this dictionary is due to a government contract with System Development Corporation, who had the dictionary transcribed via keypunch in the early 1970's. I have contacted Merriam-Webster about the status of this dictionary, and have been asked by them to state the following: 1. This dictionary may be used for research purposes only. It may not be made commercially available, and the data from the dictionary may not be used in any publications without express written consent of the publisher. 2. This dictionary may not be redistributed, as Webster is trying to prevent the increased distribution of this information (which was never intended for distribution in the first place). 3. This dictionary may not be made available over any wide-area networks such as the ARPAnet. 4. This dictionary, and the software accompanying it, are most definitely NOT in the public domain. ---------------- They had three reasons they didn't want the dictionary distributed: 1. It's a dictionary from 1963. A bit out-of-date, to say the least. 2. They had no quality-control over the keypunching. There are numerous typos. 3. They have their own electronic dictionary products (the Franklin consumer electronics things). I do not know if M-W or anyone else is offering a machine-readable dictionary, other than the OED on the NeXT machine. I've heard someone (at Indiana Univ.???) has modified the webster server to use this dictionary, but I don't know about availability. Even if you didn't read the rest of the article, please read this part: 1. NO, I CANNOT GIVE YOU A COPY OF THE DICTIONARY. Please don't ask. Re-read the above if you want to know why. 2. NO, I CANNOT GIVE OUT THE NAMES OF PLACES WHICH HAVE IT. Please don't ask. Most of them no longer make the dictionary available to the outside world, anyway. 3. NO, I DO NOT HAVE THE DICTIONARY SERVER RUNNING ON ANY MACHINES LOCALLY. Please don't bang on our machines looking for one. Queries for the above items will be cheerfully ignored. Yes, this means that unless you already have a copy of the dictionary and server, or know where a server is, "webster" and "xwebster" are pretty useless. Sorry. Dave Curry ============================================================================== Path: hplabsz!hplabs!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!pasteur!icsi.Berkeley.EDU!stolcke From: stolcke@icsi.Berkeley.EDU (Andreas Stolcke) Newsgroups: comp.windows.x Subject: Re: FYI: a working xwebster host Message-ID: <24831@pasteur.Berkeley.EDU> Date: 8 May 90 02:29:25 GMT References: <5256@hplabsz.HPL.HP.COM> Sender: news@pasteur.Berkeley.EDU Reply-To: stolcke@icsi.Berkeley.EDU (Andreas Stolcke) Distribution: comp Organization: International Computer Science Institute, Berkeley Lines: 40 In article <5256@hplabsz.HPL.HP.COM>, mayer@hplabsz.HPL.HP.COM (Niels Mayer) writes: |> In article drich@klaatu.lanl.gov (David O. Rich) writes: |> > Try: |> > |> > 128.32.136.1 (agate.Berkeley.EDU) |> > in the hostAddrList. |> |> Well, now that this info is public, we'll see how long this webster server |> port lasts.... |> I too am wondering. A while ago I posted a similar query for webster servers and was lucky to find a local one (said agate.Berkeley.EDU). I would strongly encourage xwebster users to post a request to their local news group (or whereever) to locate a nearby server. To save poor old agate at least from folks at Toronto, Indiana and Brown, here are some more addresses I found in my quest: neat.cs.toronto.edu 128.100.1.65 iuvax.cs.indiana.edu 129.79.254.19 bu-it.bu.edu 128.197.2.40 You'll need xwebster.hostPort: 2627 in your resources to access these. Now, if you have a NeXT machine on your network somewhere (and are entitled to using it) you might want to tap its on-line Webster using the webster daemon written by Steve Hayman (sahayman@iuvax.cs.indiana.edu). - ---- Andreas Stolcke International Computer Science Institute stolcke@icsi.Berkeley.EDU 1957 Center St., Suite 600, Berkeley, CA 94704 (415) 642-4274 ext. 126 ============================================================================== Path: hplabsz!hplabs!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!unixhub!shelby!neon!lucid.com!jwz From: jwz@lucid.com (Jamie Zawinski) Newsgroups: comp.mail.multi-media Subject: dictionary servers Message-ID: Date: 9 Nov 90 01:34:16 GMT Sender: jwz@lucid.com Organization: Lucid, Inc., Menlo Park, CA Lines: 73 I know of two formats in which Webster's dictionary can be found online. I have a GNU Emacs package (by Jason Glasgow) for talking to one of them, and a Unix program (by Ed James) for talking to the other. mintaka.lcs.mit.edu runs a server of the first kind, and pasteur.berkeley.edu runs a server of the second kind; but pasteur won't talk to any machines not at berkeley, so I can't use it any more. This is unfortunate, because the second format is a better one. So my first question is, are there any machines out there which run a server of the second sort which will talk to me? My second question is, are either of these formats the same as that which the NeXT webster server uses? If not, what is the format that the NeXT server uses? And are there any NeXTs out there which will answer webster connections to arbitrary machines on inet? Here is a brief description of the two formats I know of, so you will know what I'm talking about; The mintaka kind uses port 103; it is very simple, supporting single-word commands of the form "DEFINE word"; it does spelling correction as well, when you ask for the definition of a word that it doesn't know about, or when you issue the command "SPELL word". There is also a command for listing all words beginning with a given prefix. The definition which is sent back looks like phi.lis.tine \'fil-*-.ste-n; f*-'lis-t*n, -.te-n; 'fil-*-st*n\ \-.iz-*m\ n cap 1: a native or ingabitant of ancient Philistia often cap 2a: a crass prosaic often priggish individual guided by material rather tha n intellectual or artistic values : BABBITT 2b: one uninformed in a special area of knowledge - philistine aj that is, the paragraphs come filled, and lines are pre-wrapped at 79 columns. There is little hope for making this look any prettier, since it's been chewed on already. The other kind of server, of which pasteur.berkeley.edu is a variety, uses port 1964, and has an interface very much like SMTP or NNTP - responses begin with three digit numbers, 2-- means ok, 5-- means failure, etc. The big win of this server is that it preserves font-change and special-character information. The definition body that comes back is broken up into records. There are two levels of encoding; at the first level structural elements of the definition are sent one per line, in a form like : ; ; ... where the character says what kind of record this is (definition, label, cross-reference, etc). Each kind of record has a fixed number of fields in it, separated by semicolons. This means that if a word has several definitions (as philistine does, above) then each definition will be in its own record. When the fields contain text, as definitions do, they contain typesetter information. Special characters and font-changes are encoded with "overstruck" characters, that is, a sequence like will either change the font, or will map to one or more different characters. No line-breaks are included, so a client gets to format and wrap the definitions as it likes. One interesting fact is that it is apparently that the mintaka database was derived from the pasteur database (or a common source) because I have come across definitions in mintaka's dictionary which have had the font-information improperly stripped out! Parts of the font change codes were still visible in a few cases. So, any answers? -- Jamie PS: if you have access to a server of the same genotype as pasteur, and you have a TI Explorer Lisp Machine, you can use the code in /usr/jwz/public/dictionary-client.lisp on spice.cs.cmu.edu to talk to it with a hypertextized interface (clicking on words defines them, making it easy to navigate around the dictionary). GNU Emacs code for talking to the other kind is available at your favorite emacs archive site. ============================================================================== Path: hplabsz!hplabs!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!cica!iuvax!royle From: royle@iuvax.cs.indiana.edu (Keenan Royle) Newsgroups: comp.mail.multi-media Subject: Re: dictionary servers Message-ID: <70749@iuvax.cs.indiana.edu> Date: 9 Nov 90 04:58:02 GMT References: Organization: Computer Science Department, Indiana University Lines: 11 iuvax.cs.indiana.edu is a webster server. it is also the home of the software to use NeXT as a webster server for a generic UNIX clients. (anon ftp) -- Keenan Royle royle@cs.indiana.edu postmaster@cs.indiana.edu royle@iubacs.bitnet ============================================================================== Path: hplabsz!hplabs!ucbvax!ziploc!eps From: eps@toaster.SFSU.EDU (Eric P. Scott) Newsgroups: comp.sys.next Subject: Re: Webster via remote logins. Is it possible? Summary: Available by anonymous FTP from sutro.sfsu.edu Message-ID: <184@toaster.SFSU.EDU> Date: 11 Dec 89 13:33:04 GMT References: <1989Dec10.195312.18995@zaphod.mps.ohio-state.edu> Reply-To: eps@cs.sfsu.edu Organization: San Francisco State University Lines: 36 In article <1989Dec10.195312.18995@zaphod.mps.ohio-state.edu>, nevai@function.mps.ohio-state.edu (Paul Nevai) writes: > Is it possible to use Wbster via remote logins? Sure. There are two pieces: websterd, a TCP server that will run on any NeXT, and webster, a client that will run on any UNIX system that talks TCP (including the NeXT). In ~ftp/pub on sutro.sfsu.edu: The file NeXT-websterd.shar is Steve Hayman's server program. Read the enclosed instructions about setting the oknets[] array--and remember to list net 127 so you can access it from your own machine! You will have to add a line to services in netinfo: x400 103/tcp dictionary webster That's right, it "traditionally" co-opts the x.400 port. (Except at Stanford, where they advocate 2627) webster.tar.Z also has a table that needs to be modified, in this case the hosts that you want to try (in order) for webster servers. If you're compiling this on a NeXT, the first one should be localhost. It works without modification on SunOS and HP/UX, and shouldn't have any problems on your favorite networked UNIX. We've even set it up as a login shell for a non-passworded "webster" username on non-NeXT machines. There's a webster.el for GNU emacs in this package as well. I've found its performance to be somewhat erratic. As is, as always. I worked on part of the webster client, but the rest is strictly not-invented-here. -=EPS=- ==============================================================================