Loading ...
Sorry, an error occurred while loading the content.
 

search for two words close to each other?

Expand Messages
  • Jonathan Woodbridge
    Would it be possible to write a clip that would allow one to search for two words located close to each other (boolean NEAR or similar)? I am thinking of a
    Message 1 of 4 , May 16, 2002
      Would it be possible to write a clip that would allow one to search for
      two words located close to each other (boolean NEAR or similar)? I am
      thinking of a clip that would search for one word, compile a temp file
      of lines containing that word and then scan that temp file for the
      second word. But it would have to keep the locations to those lines, so
      it might be prohibitively slow??

      I keep all sorts of stuff in Notetab that I should really keep in a
      database, but there it is...

      Even a third-party tool that can scan text files this way (on the
      off-topic list, of course ;-) )

      thanks for your thoughts,

      Jonathan
    • Jody
      Hi Jonathan, http://www.notetab.net/zip/replace.zip It has a Clip named: And, Or, but Not... ...and also: NOT in..., If in Line... I forget how accurate they
      Message 2 of 4 , May 16, 2002
        Hi Jonathan,

        http://www.notetab.net/zip/replace.zip

        It has a Clip named: And, Or, but Not...
        ...and also: NOT in..., If in Line...

        I forget how accurate they are- I think it works though. <g> The
        And, Or, but Not... deals with paragraphs. Perhaps you can edit
        it to fit your needs. It is fairly slow though as you mentioned.
        I think it searches every paragraph for each entry that you use;
        you do not have to put something in each field. So, you could
        have up to 3 passes through every paragraph one at a time.

        You mentioned a third party app. Our MailBag Assistant does what
        you want, but off the top of my head I do not think it will
        return the location. You'd just have to build a simple script in
        NoteTab to ship a file to MBA. ;)

        Oh, I forgot I had a Library for Agent Ransack. I think it will
        do what you want. Try: http://www.notetab.net/zip/ransack.zip I
        originally made the Library to search a Bible returning the verses
        that AR finds the criteria in. It works pretty OK. ;) That is
        why you will see the download links and Clips for a Bible. If
        you use the GUI itself instead of the commandline there is a
        regular expression wizard in it. You answer the questions asked
        and the expression is built where you can see it. Pretty neat I
        thought.

        ;Agent Ransack Info ~ http://www.notetab.net ~
        You need the freeware search utility called Agent Ransack
        for this which can be downloaded from the following website:

        http://www.agentransack.com/
        http://www.agentransack.com/download.asp

        Download Agent Ransack from Simtel.net (agentr05.exe)
        http://www.simtel.net/pub/dl/18453.shtml

        Or ultimately from this site (for bandwidth reasons please
        use Simtel.net if possible):
        Download Agent Ransack
        http://www.mythicsoft.com/download/agentran.exe

        You need to "Run Setup" before using, Clip is below.

        >Would it be possible to write a clip that would allow one to
        >search for two words located close to each other (boolean NEAR or
        >similar)? I am thinking of a clip that would search for one word,
        >compile a temp file of lines containing that word and then scan
        >that temp file for the second word. But it would have to keep the
        >locations to those lines, so it might be prohibitively slow??


        Happy Clip'n!
        Jody

        http://www.notetab.net

        Subscribe, UnSubscribe, Options
        mailto:Ntb-Clips-Subscribe@yahoogroups.com
        mailto:Ntb-Clips-UnSubscribe@yahoogroups.com
        http://groups.yahoo.com/group/ntb-clips
      • Peter Stagg
        Do you know what is most likely to between the words you are looking for. If you know this you could easily build a regex to find the words near each other.
        Message 3 of 4 , May 16, 2002
          Do you know what is most likely to between the words you are looking
          for. If you know this you could easily build a regex to find the words
          near each other.

          How close is NEAR by the way?

          > -----Original Message-----
          > From: Jonathan Woodbridge [mailto:woodbridge@...]
          > Sent: Friday, 17 May 2002 2:54 AM
          > To: ntabclips
          > Subject: [Clip] search for two words close to each other?
          >
          >
          > Would it be possible to write a clip that would allow one to
          > search for two words located close to each other (boolean
          > NEAR or similar)? I am thinking of a clip that would search
          > for one word, compile a temp file of lines containing that
          > word and then scan that temp file for the second word. But it
          > would have to keep the locations to those lines, so it might
          > be prohibitively slow??
          >
          > I keep all sorts of stuff in Notetab that I should really
          > keep in a database, but there it is...
          >
          > Even a third-party tool that can scan text files this way (on
          > the off-topic list, of course ;-) )
          >
          > thanks for your thoughts,
          >
          > Jonathan
          >
          >
          > ------------------------ Yahoo! Groups Sponsor
          > ---------------------~--> Tied to your PC? Cut Loose and Stay
          > connected with Yahoo! Mobile
          > http://us.click.yahoo.com/QBCcSD/o1CEAA/sXBHAA> /dkFolB/TM
          >
          >
          > --------------------------------------------------------------
          > -------~->
          >
          >
          >
          > Your use of Yahoo! Groups is subject to
          > http://docs.yahoo.com/info/terms/
          >
          >
          >
          >
        • Jonathan Woodbridge
          Hello Peter and Jody Jody: I had forgotten about And, Or, but Not... I have it somewhere, I will rummage and see if it works. I tried Agent Ransack and found
          Message 4 of 4 , May 17, 2002
            Hello Peter and Jody

            Jody: I had forgotten about And, Or, but Not...

            I have it somewhere, I will rummage and see if it works.

            I tried Agent Ransack and found that it failed to find some text that
            the Windows File Find found. I let the developer know and I think he
            promised an upgrade, but it was a while ago...

            Peter:

            > Do you know what is most likely to between the words you are looking
            for. If you know this you could > easily build a regex to find the words
            near each other.

            Yes. I was looking for a more general-purpose kludge/tool rather than
            something I'd have to cook up each time.

            How close is NEAR by the way?
            I think Altavista defines it as 10 characters. In the same line would
            also be ok, but obviously subject to problems if one word is at one end
            of its line and the other just over the line from it...but that's what
            you get looking at a line-oriented approach.

            thanks,

            Jonathan
          Your message has been successfully submitted and would be delivered to recipients shortly.