🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.infosystems.wais
2 messages
2 total messages Started by Rick Cochran Thu, 28 Jan 1993 20:59
waisindex for words with embedded punctuation
#373
Author: Rick Cochran
Date: Thu, 28 Jan 1993 20:59
69 lines
2887 bytes
waisindex does not allow a word to have embedded punctuation.  I wanted to
be able to search for things like "AIX 3.2.3" (heaven help me) so I made the
following changes.

It would be nice if wasindex's concept of a "word" could be customized.

-Rick

*** ir/irtfiles.c.orig	Wed May  6 20:31:33 1992
--- ir/irtfiles.c	Wed Jan 27 10:44:55 1993
***************
*** 284,290 ****
  
    for(ch = (unsigned char)line[char_count++]; 
        ch != '\0'; ch = (unsigned char)line[char_count++]){
!     boolean alnum = isalnum(ch);
      if(alnum){
        /* put the character in the word if not too long */
        if(position_in_word == 0)
--- 284,291 ----
  
    for(ch = (unsigned char)line[char_count++]; 
        ch != '\0'; ch = (unsigned char)line[char_count++]){
!     boolean alnum = isalnum(ch)
!       || ((position_in_word != 0) && (! isspace(ch)) && isalnum((unsigned char)line[char_count]));
      if(alnum){
        /* put the character in the word if not too long */
        if(position_in_word == 0)
***************
*** 391,397 ****
  
    for(ch = (unsigned char)line[char_count++]; 
        ch != '\0'; ch = (unsigned char)line[char_count++]){
!     boolean alnum = isalnum(ch);
      if(alnum){
        /* put the character in the word if not too long */
        if(position_in_word == 0)
--- 392,399 ----
  
    for(ch = (unsigned char)line[char_count++]; 
        ch != '\0'; ch = (unsigned char)line[char_count++]){
!     boolean alnum = isalnum(ch)
!       || ((position_in_word != 0) && (! isspace(ch)) && isalnum((unsigned char)line[char_count]));
      if(alnum){
        /* put the character in the word if not too long */
        if(position_in_word == 0)
*** ir/cutil.c.orig	Thu Apr 30 12:03:35 1992
--- ir/cutil.c	Tue Jan 26 15:25:49 1993
***************
*** 384,390 ****
      
    /* find the end of the next token */
    for (; searchStr[i] != '\0'; i++)
!     { if (!isalnum(searchStr[i]))
  	break;
      }
     
--- 384,390 ----
      
    /* find the end of the next token */
    for (; searchStr[i] != '\0'; i++)
!     { if (!(isalnum(searchStr[i]) || ((! isspace(searchStr[i])) && isalnum(searchStr[i+1]))))
  	break;
      }

-- 
|Rick Cochran		  607-255-7223		     rick@msc.cornell.edu|
|Cornell Materials Science Center		     rick@crnlmsc2.bitnet|
|E20 Clark Hall, Ithaca, N.Y. 14853	     cornell!msc.cornell.edu!rick|
Re: waisindex for words with embedded punctuation
#372
Author: Don Gilbert
Date: Thu, 28 Jan 1993 22:04
17 lines
1453 bytes
In article <1993Jan28.205926.3113@msc.cornell.edu> rick@cougar.msc.cornell.edu (Rick Cochran) writes:
>waisindex does not allow a word to have embedded punctuation.  I wanted to
>be able to search for things like "AIX 3.2.3" (heaven help me) so I made the
>following changes.
>
>It would be nice if wasindex's concept of a "word" could be customized.A

See my mods to wais version 8b5, avail. via anon. ftp to ftp.bio.indiana.edu,
folder util/wais/ as iubio-wais...tar.Z.   It includes user-specified
set of word-delimiter symbols (as many biological data words contain
symbols).  Note these mods affect both indexer and server, and each
index has an "index.dlm" file of delimiter symbols associated.
-- Don

-- 
Don Gilbert                                     gilbert@bio.indiana.edu
biocomputing office, biology dept., indiana univ., bloomington, in 47405
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads