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

Re: [Clip] Concept-based Search

Expand Messages
  • Flo
    ... Bob, Thanks for your reply! An initial attempt to this job could be to insert markers that assign meanings. Here is just a rough draft of this... * Save as
    Message 1 of 34 , Jan 13, 2008
    • 0 Attachment
      --- In ntb-clips@yahoogroups.com, Bob Gorman <bgorman@...> wrote:
      >
      > What I'm currently experimenting with is finding words that
      > reflect one's dominant sensory mode. Words like: Visual: see,
      > look, bright, clear, draw, etc. Audio: hear, sound, listen,
      > rings, told, etc. Touch: touch, twist, hold, doing, grasping,
      > etc.

      Bob,

      Thanks for your reply!

      An initial attempt to this job could be to insert markers that assign
      meanings. Here is just a rough draft of this...

      * Save as MEANINGS.TXT...

      visual|see|look|bright|clear|draw|blind
      audio|hear|sound|listen|rings|told
      touch|twist|hold|doing|grasping


      * Clip to insert meanings...

      H=Sensory
      ^!SetScreenUpdate Off
      ^!Set %Meaning%=^?[Choose a meaning:==Audio|Touch|Visual]
      ^!Open ^$GetDocumentPath$MEANINGS.TXT
      ^!Jump Doc_Start
      ^!Find "^%Meaning%" RSI
      ^!Set %Search%=^$GetParagraph$
      ^!Close MEANINGS.TXT,Discard
      ^!SetScreenUpdate On
      ^!Jump Doc_Start
      ^!Replace "\w*(^%Search%)\w*" >> "$1 {» ^%Meaning% }" AWIRST
      ^!Info Finished!


      * Sample text for testing that clip...

      "This is just a nonsense text for testing the Sensory clip. Mary
      waves at him to draw his attention. None are so blind as they who
      will not see. Business letters should be clear. Acoustics is the
      science of sound. The bell rings in the evenings. He touched the
      break. He should look up the word. I told him to listen to the music
      but he couldn't hear it. Paul lost his grasp on the suitcase. A verb
      is a word which signifies action or the doing of something. Hold your
      horse, he cried, but they did not listen. Her eyes were bright with
      tears."


      The clip prompts you to choose a meaning. Keep MEANINGS.TXT closed
      and watch how meanings are inserted after related words.

      * Find inserted meanings with the following clip. Place cusor at
      starting position.

      H=Sensory_Find
      ^!SetHintInfo Stop search with Shift Key!

      :Start
      ^!Find "{»" S
      ^!IfError Message
      ^!Delay 15
      ^!IfTrue=^$IsShiftKeyDown$ End Else Next
      ^!MoveCursor +1
      ^!Goto Start

      :Message
      ^!Info No more hits!


      * Delete inserted meanings with...

      H=Sensory_Delete
      ^!Replace "\040\{»\s\w+\s\}" >> "" AWRS


      Of course, this approach is not suited to managing a giant text
      corpus.

      Another idea: Extract lists of related words or complete sentences
      that contain certain meanings...

      Regards,
      Flo
       
    • dracorat
      I should also point out that including the pluras es form is sometimes not desired. For example, if we had car|automobile we would get: Sally cares
      Message 34 of 34 , Jan 18, 2008
      • 0 Attachment
        I should also point out that including the pluras "es" form is
        sometimes not desired. For example, if we had car|automobile we would get:

        Sally cares {automobile} about her dog.

        But for that matter, the "s" form has the same issue, just in lower
        quantity. Thus, it's a question of what's better - smaller dictionary,
        or dictionary with every valid permutation.

        (Or even, just do only "s")

        His cat let out a loud hiss.

        his|owner

        His {owner} cat let out a loud hiss {owner}.

        The "s" case would be pretty rare, however. (The "es" not so rare.)

        --Keith

        --- In ntb-clips@yahoogroups.com, "dracorat" <dracorat@...> wrote:
        >
        > I forgot to include the trailing questionmark. Sorry bout that.
        > (Because it's optional to be plural)
        >
        > If you leave off the $2, the plural form will be changed to the
        > singular. The second capture is what plural form we found.
        >
        > --Keith
        > (Happy ho help. - I LOVE regular expressions)
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.