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

[Clip] Re: Statistics on multi-word phrases

Expand Messages
  • Jody
    Hi Webmaster, ... I believe this is what you are asking for. I m too brain dead to explain how it works now, if I even can - haha. You can type in up to
    Message 1 of 3 , Sep 3, 1999
    • 0 Attachment
      Hi Webmaster,

      > Is there any way to program a clip that first brings up a
      > dialog box for unique word(s) input ("sammy", "hits", "home",
      > "run") and then have the clip run stats for not only these
      > separate words, but also the words together as a phrase, "sammy
      > hits home run" and then return the results.

      I believe this is what you are asking for. I'm too brain dead to
      explain how it works now, if I even can - haha. You can type in
      up to eleven words or select the phrase. You can make it longer
      by adding more ListCounts in the :Info section. I be an ignernt
      hillbilly and do not know how to make an info box with just the
      count of the words after the Clip starts. I could do it with a
      scratch pad and delete it, but its not worth it to me. Perhaps
      one of the smart folk can show me how to do it without going
      through all that.

      <--- Copy below this line --->
      H=Phrase/Word Count
      ; 09/03/1999, Ntb-Clips@..., jody
      ^!ClearVariables
      ^!Jump 1
      ^!Set %Count%=0; %PhraseCount%=0; %FindCount%=0; %ListCount%=0; %n%=1
      ^!SetListDelimiter ^%Space%
      ; One line till SetHint...
      ^!Set %Criteria%=^?{Search criteria, add spaces between words (up to 11 total)=^$GetSelection$}; %Start%=^?{Start at beginning of doc==_Yes|No}
      ^!SetHintInfo Searching...
      ^!SetScreenUpdate Off

      ^!IfFalse ^%Start% Skip
      ^!Jump 1
      ^!Jump Select_Start

      :Phrase
      ^!Find "^%Criteria%" S
      ^!IfError SetArray
      ^!Inc %PhraseCount%
      ^!Goto Phrase

      :SetArray
      ^!If ^%PhraseCount% = 0 Error
      :DoAnyway
      ^!SetArray %FindList%=^%Criteria%
      ^!Set %Count%=^%FindList0%
      ^!Set %Index%=0

      :StartArray
      ^!Jump 1
      ^!Inc %Index%
      ^!If ^%Index% > ^%Count% Info

      :Word
      ^!Find "^%FindList^%Index%%" S
      ^!IfError Skip_2
      ^!Inc %FindCount%
      ^!Goto Word

      ^!Append %ListCount^%n%%=^%FindList^%Index%% = ^%FindCount%
      ^!Inc %n%
      ^!Set %FindCount%=0
      ^!Goto StartArray

      :Info
      ; Add more ListCounts following the same pattern for a larger phrase.
      ; One line till ^!Goto End
      ^!Info [L]^%Criteria% = ^%PhraseCount%^p^p^%ListCount1%^p^%ListCount2%^p^%ListCount3%^p^%ListCount4%^p^%ListCount5%^p^%ListCount6%^p^%ListCount7%^p^%ListCount8%^p^%ListCount9%^p^%ListCount10%^p^%ListCount11%
      ^!Goto End

      :Error
      ^!Skip [^%Criteria%] was not found in the document - uh, wrong file perhaps? <g> Search the file anyway?
      ^!Goto End
      ^!Goto DoAnyway

      <--- Copy above this line, right --->
      <--- click over the Clipbook and --->
      <--- choose "Add from Clipboard" --->


      Happy Clip'n!
      Jody

      The NoteTab Clip List...
      mailto:Ntb-Clips-Subscribe@...
      mailto:Ntb-Clips-UnSubscribe@...
    Your message has been successfully submitted and would be delivered to recipients shortly.