Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ntb-clips · The NoteTab Clips List

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 12881 - 12910 of 23787   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#12881 From: "Hugo Paulissen" <hugopaulissen@...>
Date: Wed Dec 1, 2004 8:06 am
Subject: Re: Extracting words from a file
hugo_paulissen
Send Email Send Email
 
Franz,

As Jody mentioned the regular expression engine can be reluctant.
That's why I gave you a very simple regex, if it doesn't work...
you could try to build another way to jump to the next word and have
that checked for Capitalization. Or else, just look for " A", " B",
etc. and then do ^!SetClipboard ^$GetWord$.

Hugo

>
> ^!Jump DOC_START
> :GETCAP
> ^!Find "[A-Z]+" R
> ^!IfError END
> ^!IfTrue ^$IsCapitalized("^$GetWord$")$ ^!SetClipboard ^$GetWord$
> ^!GoTo GETCAP
>

#12882 From: Ian Rastall <idrastall@...>
Date: Wed Dec 1, 2004 5:36 am
Subject: Clips in context menu
the_rastallian
Send Email Send Email
 
Hi, just coming back after being away from the group for awhile. I
used to lurk on here. I'm wondering if it's possible to add clips
to the right-click menu, because that would simplify things for me
no end. At the moment all I have there is Cut, Copy and Paste, but
I don't believe I had much luck in getting clips in there. Is
there a way to do this?

TIA

Ian
--
http://www.sundry.ws/
http://www.bookstacks.org/

#12883 From: "Dave" <dgm2003@...>
Date: Wed Dec 1, 2004 12:35 pm
Subject: topic in otl
david_99_au
Send Email Send Email
 
Hi
the clip below I use to change a hole section to upper case ,it has trouble
detecting the end of the topic and then jumps to the next one or two. I
think before I tried various  ways to detect end of text in a topic and had
trouble ended up  with what is below.
has anybody got a better idea??
H="UpperCase\:"
^!SET %ROWT%=^$GETROW$
^!Set %lastline%=^$GetLineCount$
^!SET %ROWBT%=^$calc(^%lastline% - ^%ROWT%)$
^!SET %N%=1
^!SetCursor ^%ROWT%:1
:START
^!Find "\D*\:" SIR
^!MENU Modify/Text Case/Upper Case
^!INC %N%
^!IF ^%N% <= ^%ROWBT% START

     THANKYOU    DAVE

#12884 From: "bizshop1" <steve@...>
Date: Wed Dec 1, 2004 1:54 pm
Subject: Re: topic in otl
bizshop1
Send Email Send Email
 
If you just want to change the case on the whole topic, what I would
do is

^!Select All
and then your
^!MENU Modify/Text Case/Upper Case

--- In ntb-clips@yahoogroups.com, "Dave" <dgm2003@o...> wrote:
> Hi
> the clip below I use to change a hole section to upper case ,it has
trouble
> detecting the end of the topic and then jumps to the next one or two. I
> think before I tried various  ways to detect end of text in a topic
and had
> trouble ended up  with what is below.
> has anybody got a better idea??
> H="UpperCase\:"
> ^!SET %ROWT%=^$GETROW$
> ^!Set %lastline%=^$GetLineCount$
> ^!SET %ROWBT%=^$calc(^%lastline% - ^%ROWT%)$
> ^!SET %N%=1
> ^!SetCursor ^%ROWT%:1
> :START
> ^!Find "\D*\:" SIR
> ^!MENU Modify/Text Case/Upper Case
> ^!INC %N%
> ^!IF ^%N% <= ^%ROWBT% START
>
>     THANKYOU    DAVE

#12885 From: "Dave" <dgm2003@...>
Date: Wed Dec 1, 2004 12:16 pm
Subject: i_view32
david_99_au
Send Email Send Email
 
Hi
E:\SYD BARRETT.jpg
If You Place The Above In A Text Document And Use The View Clip It Opens The
Image.

H="view"
^!c:\IrfanView\i_view32.exe ^&

SELECTING THE IMAGE IN THE LINE BELOW WILL NOT WORK ,HAS ANYONE GOT THIS
SORT OF IDEA TO WORK
a href="AudioCompleteIndex.html#2001X3"><IMG SRC="2001/3f.jpg"

     THANKYOU      DAVE

#12886 From: "Don - htmlfixit.com" <don@...>
Date: Wed Dec 1, 2004 4:57 pm
Subject: Re: [Clip] i_view32
dpasseng
Send Email Send Email
 
Dave wrote:
> Hi
> E:\SYD BARRETT.jpg
> If You Place The Above In A Text Document And Use The View Clip It Opens The
> Image.
>
> H="view"
> ^!c:\IrfanView\i_view32.exe ^&
>
> SELECTING THE IMAGE IN THE LINE BELOW WILL NOT WORK ,HAS ANYONE GOT THIS
> SORT OF IDEA TO WORK
> a href="AudioCompleteIndex.html#2001X3"><IMG SRC="2001/3f.jpg"
>
>     THANKYOU      DAVE

I am not sure I fully understand, but I suspect the problem is your
directory structure.  The first presumably includes the directory, while
the latter does not. If I have missed the mark, let me know.

If I use your clip, then I can open for example this file:
c:/Documents and Settings/username/My Documents/temp.jpg
by highlighting it and clicking the clip.
Note that I cannot open it however if it has %20's in lieu of spaces!
c:/Documents and%20Settings/passengd/My%20Documents/temp.jpg
and that is the native format, for example if I use the insert image
feature in html contained in notetab to get an image link inserted into
a non-saved file.

So I guess I might add to the front of your clip a search and replace
and a variable set so that I don't actually change the highlighted
content thus:
11 lines follow
; by don at htmlfixit.com
; open highlighted full path to image
; in irfanview
; format: c:/Documents and Settings/username/My Documents/temp.jpg

; start clip - line 7
^!Set %TempVar%=^$GetSelection$
^!Replace "%20" >> " " ATIHS
^!C:\Program Files\IrfanView\i_view32.exe ^%TempVar%
; end clip - line 11

To open a relative link, you need to first set the directory.  I think
this one will work for that, assuming the link is relative to the
current document.

11 lines follow
; by don at htmlfixit.com
; open highlighted relative path to image
; in irfanview
; format: subdirectory(ies)/temp.jpg

; start clip - line 7
^!Set %TempVar%=^$getpath(^**)$^$GetSelection$
^!Replace "%20" >> " " ATIHS
^!C:\Program Files\IrfanView\i_view32.exe ^%TempVar%
; end clip - line 11

#12887 From: "franz_sternbald" <franz_sternbald@...>
Date: Wed Dec 1, 2004 5:21 pm
Subject: Re: Extracting words from a file
franz_sternbald
Send Email Send Email
 
Hi,

Thanks for the solutions you presented here...

@Josh

Actually, there are two different ways to do this job: 1. To extract
the words you want to get, or 2. to delete the words you don't want
to get. The problem with #2 is this: Since I'm evaluating text
databases of 500 KB, 1 MB or more I would have to delete an enormous
amount of characters and strings that don't match the search
criteria. This would demand dozens of command lines and RegExes for
reducing the file. So I tried it the other way round, i.e. by
extracting the matching words only.

@Hugo

Using the Pasteboard Function is a clever solution! With files > 500
KB, however, this lasts an intolerable long time. So far, no error
message has shown up but I stopped that procedure after half an hour.

Maybe a mixture of both models would be the best solution. That is,
first to reduce the file by eliminating certain strings, and then
extracting the words I need. (The use of all this is to produce an
index or thesaurus of keywords in a text database.)

I used the ^$IsAlphaNumeric$ operator you mentioned but this wouldn't
select compounds with hyphen like "Hewlett-Packard" since the
uppercase letter at the beginning is followed by another uppercase
letter. So I'm working with ^$IsUppercase(^$StrIndex("Str";1)$.

Any more ideas would be highly appreciated...

Regards,
Franz

PS Hi Jody! Thanks for your comment - still you see me
working on that issue. Flo ;-)

#12888 From: "Hugo Paulissen" <hugopaulissen@...>
Date: Wed Dec 1, 2004 7:42 pm
Subject: Re: Extracting words from a file
hugo_paulissen
Send Email Send Email
 
franz,

Are you using Pro or Light? That makes quite a difference in speed.

What about this approach? You can easily see for yourself if this is
of any help.

1. replace " " with "^P" - don't know how fast that would be
2. trim/left align the text (which should have most words on a
separate line by now)
3. sort the document with [Case Sensitive Sorting] and [Remove
Duplicates] switched on (in options)

Hugo


> Maybe a mixture of both models would be the best solution. That is,
> first to reduce the file by eliminating certain strings, and then
> extracting the words I need. (The use of all this is to produce an
> index or thesaurus of keywords in a text database.)
>
> I used the ^$IsAlphaNumeric$ operator you mentioned but this
wouldn't
> select compounds with hyphen like "Hewlett-Packard" since the
> uppercase letter at the beginning is followed by another uppercase
> letter. So I'm working with ^$IsUppercase(^$StrIndex("Str";1)$.
>

#12889 From: Jody <kjv-av1611@...>
Date: Wed Dec 1, 2004 8:09 pm
Subject: Re: [Clip] Re: Extracting words from a file
notetabber
Send Email Send Email
 
Hi Franz,

>PS Hi Jody! Thanks for your comment - still you see me working on
>that issue. Flo ;-)

I know you. :) Hugo has it under control for you. He is more than
competent in NoteTab. My guess is that his next step will be to
make you a Clip without RegExp once you let him know the manual
method works. You could probably do that yourself with a series
of ^!Replace "" >> "" OPTIONS commands, or checking every word
using the functions you have been using in a loop with some other
code. There's also ^$StrSort(...)$ that might run faster to find
the CAPS.

bcnu,
jody

       I can only please one person a day.
        Today is obviously not your day.
       Tomorrow doesn't look good either. 8D
           http://www.clean-funnies.com
      http://www.fookes.com/regnow.html?2448 ;)
         http://www.sojourner.us/software

#12890 From: "abairheart" <abairheart@...>
Date: Wed Dec 1, 2004 8:33 pm
Subject: Re: [Clip] Removing numbers from a list
abairheart
Send Email Send Email
 
Franz,

let me add my two cents worth to the finding of numbers with regexp
in NoteTab:

I have found, that NoteTab does not recognize escaped characters as
well as character classes. Whenever I search for digits, I use 0-9.

In your case:

^!Replace "^[0-9]+$"(tab)""(tab)RIS

Placing quotes around the search string ALSO confuses NoteTab at
times. So the search command above will also work without the quotes!
In other words, two consecutive tabs will replace the search string
with nothing

Abair

#12891 From: "abairheart" <abairheart@...>
Date: Wed Dec 1, 2004 8:51 pm
Subject: Re: Clips in context menu
abairheart
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, Ian Rastall <idrastall@c...> wrote:
> ... if it's possible to add clips to the right-click menu


I shouldn't answer this without Notetab open, but a bit of searching
around the options menu will do you good.

Click View menu --> Options --> Toolbar
will let you add, remove items from the toolbar,

Click View menu --> Options --> (?Menu?)
will add/remove items from the right-click menu.

Just search all the tabs in the Options window, until you see a list
similar to the toolbar list.


Unfortunately, you may have to scrol way down a list, before you find
what you want. And reordering these lists is a pain-in-the-but.

I maintain about a dozen differnet INI files, so I eventually got
tired of rearranging each one, and simply copied the entire [toolbar]
section of the working INI file to replace the toolbar section in the
setup I wanted to change.

Too bad Eric didn't document these INI files better. There is a lot
of useful stuff you can do with them.



Abair

#12892 From: "Alec Burgess" <burale@...>
Date: Thu Dec 2, 2004 3:57 am
Subject: Re: [Clip] Re: Extracting words from a file
alecb3ca
Send Email Send Email
 
Franz
>>I'm trying to create a clip that extracts all capitalized words from
a file and stores them in a new file.
<<

Following Hugo's suggestion about changing the sort parameters, I tested
this on a 475 KB file. Its not instantaneous;-( , but the result in fairly
acceptable time is a list of all individual upper case words in a file.

H=Just UpperCase words
; Alec Burgess 2004-12-01 (Wed)
;^!setdebug ON

; change spaces and tabs to new-lines
^!replace " " >> "^P" wsa
^!replace "^t" >> "^P" wsa

;Change every non-alphanumeric leading char string to null
; -- this one takes the longest to execute - less than 30 sec
; -- on my P-III 750 Mhz 256 MB ram laptop
;putting the + on the find clause makes it catch ";;;Asdf" in addition to
; -- just ";Asdf" - time taken was doubled to about a minute.

^!replace "^[^A-Za-z0-9]+" >> "" rwsa

^!select ALL

; sort ignore case, ascending, remove duplicates
^$StrSort("^$GetSelection$";False;True;True)$

; remove all lines that do *NOT* begin with an UPPER-CASE letter
; -- using do *NOT* ignore case might make it run either faster or slower
; -- by making it find more smaller groups but has no effect on final result
^!replace "(^[^A-Z].*\n)+" >> "" rwsa

Regards ... Alec
--


---- Original Message ----
From: "Hugo Paulissen" <hugopaulissen@...>
To: <ntb-clips@yahoogroups.com>
Sent: Wednesday, December 01, 2004 14:42
Subject: [gla: [Clip] Re: Extracting words from a file

> franz,
>
> Are you using Pro or Light? That makes quite a difference
> in speed.
>
> What about this approach? You can easily see for yourself
> if this is of any help.
>
> 1. replace " " with "^P" - don't know how fast that would
> be
> 2. trim/left align the text (which should have most words
> on a separate line by now)
> 3. sort the document with [Case Sensitive Sorting] and
> [Remove Duplicates] switched on (in options)
>
> Hugo
>
>
>> Maybe a mixture of both models would be the best
>> solution. That is, first to reduce the file by
>> eliminating certain strings, and then extracting the
>> words I need. (The use of all this is to produce an
>> index or thesaurus of keywords in a text database.)
>>
>> I used the ^$IsAlphaNumeric$ operator you mentioned but
>> this wouldn't select compounds with hyphen like
>> "Hewlett-Packard" since the uppercase letter at the
>> beginning is followed by another uppercase letter. So
>> I'm working with ^$IsUppercase(^$StrIndex("Str";1)$.

#12893 From: "Alec Burgess" <burale@...>
Date: Thu Dec 2, 2004 4:06 am
Subject: Re: Re: [Clip] Removing numbers from a list
alecb3ca
Send Email Send Email
 
> Placing quotes around the search string ALSO confuses
> NoteTab at times.

FWIW, I've found the most unambiguous notation for replace strings in regexp
clip lines is:

^!replace "find-string-quoted" >> "replace-string-quoted" R
and-other-options

Regards ... Alec
--


---- Original Message ----
From: "abairheart" <abairheart@...>
To: <ntb-clips@yahoogroups.com>
Sent: Wednesday, December 01, 2004 15:33
Subject: [gla: Re: [Clip] Removing numbers from a list

> Franz,
>
> let me add my two cents worth to the finding of numbers
> with regexp
> in NoteTab:
>
> I have found, that NoteTab does not recognize escaped
> characters as well as character classes. Whenever I
> search for digits, I use 0-9.
>
> In your case:
>
> ^!Replace "^[0-9]+$"(tab)""(tab)RIS
>
> Placing quotes around the search string ALSO confuses
> NoteTab at times. So the search command above will also
> work without the quotes! In other words, two consecutive
> tabs will replace the search string with nothing

#12894 From: "Don - htmlfixit.com" <don@...>
Date: Thu Dec 2, 2004 4:38 am
Subject: Re: [Clip] Re: Extracting words from a file
dpasseng
Send Email Send Email
 
Interesting way of going at it.  Thought you might have a winner ... but
I tried it on a 181,000 word file and I got ... out of memory error.
> Following Hugo's suggestion about changing the sort parameters, I tested
> this on a 475 KB file. Its not instantaneous;-( , but the result in fairly
> acceptable time is a list of all individual upper case words in a file.
>

#12895 From: Ian Rastall <idrastall@...>
Date: Thu Dec 2, 2004 5:54 am
Subject: Re: [Clip] Re: Clips in context menu
the_rastallian
Send Email Send Email
 
On Wed, 01 Dec 2004 20:51:59 -0000, "abairheart"
<abairheart@...> wrote:

>Too bad Eric didn't document these INI files better. There is a lot
>of useful stuff you can do with them.

Hey Abair. Do you know which INI file to look at, and if it's
possible to add clips to the toolbar? I imagine that if I were
able to do that, they would show up in that list in the options
dialog. At the moment the list doesn't include personal toolbars,
such as the one I have featuring icons for some of my more-used
clips.

Thanks for your earlier reply,

Ian
--
http://www.sundry.ws/
http://www.bookstacks.org/

#12896 From: "Alec Burgess" <burale@...>
Date: Thu Dec 2, 2004 6:42 am
Subject: Re: Re: [Clip] Re: Extracting words from a file
alecb3ca
Send Email Send Email
 
Don: > I got ... out of memory error.

Checking my file with TextStatistics its:
chars=510116
Words= 76771

One time while debugging I got an out-of-memory error but closing and then
restarting Notetab and closing a couple of large programs that happened to
be running made it work.

The real pig is the line:
^!replace "^[^A-Za-z0-9]+" >> "" rwsa

perhaps removing the + sign and wrapping it in a loop so it only removes 1
non A/N char at a time ... or ... determining the invalid chars and writing
one NON-regex replace line for each would speed it up
eg.
^!replace "[" >> "" wsa
^!replace "(" >> "" wsa
etc ...

or even splitting the file in three or more chunks, processing each and then
combining the results :-)

Regards ... Alec
--


---- Original Message ----
From: "Don - htmlfixit.com" <don@...>
To: <ntb-clips@yahoogroups.com>
Sent: Wednesday, December 01, 2004 23:38
Subject: [gla: Re: [Clip] Re: Extracting words from a file

> Interesting way of going at it.  Thought you might have a
> winner ... but I tried it on a 181,000 word file and I
> got ... out of memory error.
>> Following Hugo's suggestion about changing the sort
>> parameters, I tested this on a 475 KB file. Its not
>> instantaneous;-( , but the result in fairly acceptable
>> time is a list of all individual upper case words in a
>> file.
>>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~--> $9.95 domain names from Yahoo!.
> Register anything.
> http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/dkFolB/TM
> --------------------------------------------------------------------~->
>
>
> Yahoo! Groups Links
>
>
>

#12897 From: "Dave" <dgm2003@...>
Date: Thu Dec 2, 2004 12:49 pm
Subject: topics in otl
david_99_au
Send Email Send Email
 
Hi
What is  the best way to detect end of text in a topic ,any ideas , end of
text in a topic does not seem to be reliable.???

     THANKYOU     DAVE

#12898 From: hsavage <hsavage@...>
Date: Thu Dec 2, 2004 7:42 pm
Subject: Re: [Clip] Extracting words from a file
hrs62930
Send Email Send Email
 
franz_sternbald wrote:
  >
  > Hi,
  >
  > I'm trying to create a clip that extracts all capitalized words from
  > a file and stores them in a new file.
  >
  > As a basis for that, I took the result of TOOLS | TEXT STATISTICS.
  > Unfortunately, the Text Statistic provides a sorted output that
  > ignores case and removes duplicates, regardless of the options we
  > choose in VIEW | OPTIONS | TOOLS. Consequently, it deletes the
  > capitalized version of all homonyms. For example: If the
  > words "Report" and "report" were found in a file, the Text Statistics
  > outputs "report" only. Thus many capitalized words get lost.
  >
  > So far, I didn't manage to substitute the Text Statistics with a clip
  > that provides a complete list of all capitalized words
  > in a normal text file (no list). First, I tried it this way...
  >
  > :Loop
  > ^!Find "[A-Z][A-Za-z\-]+" CRS
  > ^!IfError Output
  > ^!Set %Word%=^$GetSelection$
  > ^!Append %Copy%=^%Word%^%NL%
  > ^!Keyboard Right
  > ^!GoTo Loop
  >
  > :Output
  > ^!Toolbar New Document
  > ^!InsertCode ^%Copy%
  >
  > In principle, this is doing the job. But processing a file of 500 KB
  > is lasting "hours" and ends up in an "Out of memory" message.
  >
  > Do you know any better solution?
  >
  > Thanks,
  > Franz

Franz,

I don't know if you've decided on anything yet but, here are 2 clips,
very similar, one uses appending words to a variable, the other uses
^!AppendToFile.

The clips are set to give an audible signal on start and completion.
Also, they will enter the start time and finish time in minutes and
seconds so you can compare relative speed of clip.

I prefer the ^!AppendToFile method, it seems to have an overall small
time benefit.

I'll include the clips below, in both forms, also, a record of the
filesize and number of Cap words found in XX time.  The time counters
usually sort toward the top of list and they are normally adjacent.

If you try these, and want to keep one, the extras, sound, start/finish
time etc. can be removed.


H="Count Caps"
^!Jump 1
^!SetDebug 0
^!SetWordWrap 0
^!SetScreenUpdate 0
^!Sound ^$GetLibraryPath$cawcaw.wav
^!TextToFile "^$GetSpecialPath(Desktop)$CAPwords" ^$GetDate(< nn < ss)$^%nl%
:GETCAP
^!Find [A-Z][A-Za-z\-]+ CRS
^!IfError END
^!AppendToFile "^$GetSpecialPath(Desktop)$CAPwords" ^$GetWord$^%nl%
^!Goto GETCAP
:END
^!AppendToFile "^$GetSpecialPath(Desktop)$CAPwords" ^$GetDate(> nn > ss)$
^!Sound ^$GetLibraryPath$cawcaw.wav
^!Open "^$GetSpecialPath(Desktop)$CAPwords"
^!Select ALL
^!Keyboard Shift+Ctrl+X
^!Menu View/Line Numbers


H="Count Caps1"
^!Jump 1
^!SetDebug 0
^!SetWordWrap 0
^!SetScreenUpdate 0
^!Sound ^$GetLibraryPath$cawcaw.wav
^!Set %words%=^$GetDate(< nn < ss)$^%nl%
:GETCAP
^!Find [A-Z][A-Za-z\-]+ CRS
^!IfError END
^!Set %word%=^$GetWord$
^!Append %words%=^%word%^%nl%
^!Goto GETCAP
:END
^!Append %words%=^$GetDate(> nn > ss)$
^!TextToFile "^$GetSpecialPath(Desktop)$CAPwords" ^%words%
^!Sound ^$GetLibraryPath$cawcaw.wav
^!Open "^$GetSpecialPath(Desktop)$CAPwords"
^!Select ALL
^!Keyboard Shift+Ctrl+X
^!Menu View/Line Numbers


Cap words found 2,273
both methods

filesize 399,697

method used
appending word to variable
< 06 < 44
    nn   ss
  > 20 > 27

same method
< 51 < 30
    nn   ss
  > 56 > 27


method used
AppendToFile word
< 49 < 44
    nn   ss
  > 53 > 14

same method
< 03 < 51
    nn   ss
  > 11 > 42


ºvº
hrs <04-12-02> hsavage@...

#12899 From: "franz_sternbald" <franz_sternbald@...>
Date: Thu Dec 2, 2004 11:47 pm
Subject: Re: [Clip] Extracting words from a file
franz_sternbald
Send Email Send Email
 
Hi all,

Thanks again for all your help! I tested all your proposals. My
conclusion is: I'm on the wrong track when trying to extract the
capitalized words from a file > 500 KB. Evidently, it's the ^!Find (+
RegEx) Command, in which combination ever, that ends up in an "Out of
memory" message or forces me to terminate that procedure after 45
minutes or more. Even when performing SEARCH | COUNT OCCURRENCES with
an RegEx like [A-][A-Za-z/-]+ it ends up "out of memory" (at least on
my PC).

I think my only chance to execute that task with NoteTab (I'm using
the Pro version) is to reduce the file step by step until there's
(almost) nothing left but the words I'm searching (remember Josh's
recommendation: "I'd say don't look for Capped words, just delete
everything else and copy the result.")

However, I'll try to reduce the file with a couple of command lines,
and then apply the clips presented by hsavage. Another work-around
could be what Alec said: "splitting the file in three or more
chunks..."

Regards,
Franz

#12900 From: Larry Hamilton <lmh@...>
Date: Fri Dec 3, 2004 4:20 am
Subject: Re: [Clip] topics in otl
lm_hamilton
Send Email Send Email
 
Dave,

An otl file is a regular text file that has

= V4 Outline MultiLine NoSorting TabWidth=30

as the first line of the file. If you add this to a text file, no matter
what the extension, NoteTab will see an otl.

Each topic is set off by

H="topicname"

If you search for the H=" and go up a line or back 3 characters, you
will have the end of the topic.

There are a couple of ways to handle this. The file could be read into
memory and processed looking for the H=". Or you could make a copy of
the file without the first line and act on it via a clip(s) in NoteTab.
Or you could build a clip to go from topic to topic and highlight the
whole topic with a select all and then go to the end of the selection.
It all depends on what you are trying to do.

Larry Hamilton
lmh@...
My Webpage
http://members.tripod.com/~notlimah/index.htm
Sales Affiliate for Grisoft Anti-Virus

Dave wrote:
> Hi
> What is  the best way to detect end of text in a topic ,any ideas , end of
> text in a topic does not seem to be reliable.???
>
>     THANKYOU     DAVE

#12901 From: "franz_sternbald" <franz_sternbald@...>
Date: Fri Dec 3, 2004 3:40 pm
Subject: Re: [Clip] Removing numbers from a list
franz_sternbald
Send Email Send Email
 
Hi all,

@ Josh

> NTB Search and replace seem to have a bug, after
> a replace it picks up on the line after the one
> it left on if your search ends with a CR.
> If you advance the search manualy it does it correctly,
> but if you 'replace all' it misses lines directly
> following a previous hit.

I have to confirm that bug. NoteTab is doing exactly what you wrote.

@Abair

> I have found, that NoteTab does not recognize escaped
> characters as well as character classes. Whenever I search
> for digits, I use 0-9.

Maybe. In a clip, however, I don't see any difference between ^\d+$
and ^[0-9]+$. I get into trouble when trying to remove the empty line
that's left when a number has been deleted. That is,...

^!Replace "^[0-9]+" >> ""

works fine, but...

^!Replace "^[0-9]+\n" >> ""

will leave behind a lot of undeleted numbers. As Alan said, we are
better off when checking it against IsNumeric. Having tested all your
recommendations, I come to the following synthesis. A clip that
reliably deletes all numbers from list could be...

^!Jump 1

:Loop
^!IfTrue ^$IsNumber(^$GetLine$)$ Next Else ^!Jump +1
^!Replace "^[0-9]+$\n" >> "" RS
^!IfError End
^!GoTo Loop

:End

I tested it with a list of 10,000 lines. All numbers (integers) were
completely removed.

Regards,
Franz

#12902 From: "abairheart" <abairheart@...>
Date: Fri Dec 3, 2004 10:38 pm
Subject: Re: Extracting words from a file
abairheart
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "franz_sternbald"
<franz_sternbald@y...> wrote:
> (The use of all this is to produce an
> index or thesaurus of keywords in a text database.)


Hi Franz,

I just happend across this thread. If I have understood your needs
correctly, why not just reduce the list to a single column of words ,
and sort them case sensitive?

1. Replace all spaces in the document with "^P" to change the list to
individual words (ignore puntuation, if you like.

2. Sort the list CASE SENSITIVE

3. Delete the lower case words


500 K files should contain about 80,000 words or so. Shouldn't take
more than a few minutes to do this by hand. If you have a lot of
files you can always write down the keystrokes you use, then do the
sort by Menu commands (^!Menu Modify/...). I think there's a
configuration switch to change sorting behaviour (remove duplicates
or not; case sensitive or not).


Abair

#12903 From: "abairheart" <abairheart@...>
Date: Fri Dec 3, 2004 10:47 pm
Subject: Re: [Clip] Removing numbers from a list
abairheart
Send Email Send Email
 
--- In ntb-clips@yahoogroups.com, "Alec Burgess" <burale@a...> wrote:
> > Placing quotes around the search string ALSO confuses
> > NoteTab at times.
>
> FWIW, I've found the most unambiguous notation for replace strings
in regexp
> clip lines is:
>
> ^!replace "find-string-quoted" >> "replace-string-quoted" R
> and-other-options
>
> Regards ... Alec

Hehehe,

so which is i, to find the string-quoted at the start of a line?

^!Find ^"string-quoted"
^!Find "^string-quoted" ?


Varies depeding on what else is in the string.


Abair

#12904 From: "Don - htmlfixit.com" <don@...>
Date: Sat Dec 4, 2004 2:37 am
Subject: Re: [Clip] Re: Extracting words from a file
dpasseng
Send Email Send Email
 
> Hi Franz,
>
> I just happend across this thread. If I have understood your needs
> correctly, why not just reduce the list to a single column of words ,
> and sort them case sensitive?
>
> 1. Replace all spaces in the document with "^P" to change the list to
> individual words (ignore puntuation, if you like.
>
> 2. Sort the list CASE SENSITIVE
>
> 3. Delete the lower case words
>
>
> 500 K files should contain about 80,000 words or so. Shouldn't take
> more than a few minutes to do this by hand. If you have a lot of
> files you can always write down the keystrokes you use, then do the
> sort by Menu commands (^!Menu Modify/...). I think there's a
> configuration switch to change sorting behaviour (remove duplicates
> or not; case sensitive or not).
>
>
> Abair

Bingo Abair, with one exception that pertains to German, but not to
English!  It works and doesn't use regex.  I tried it on the 500 lines
sent by Franz and on my 181,000 word file I have been trying with all
others (always an out of memory error until now).  I used a clip to do
it as shown below.  There is one problem however ... the German
characters with two dots over them (is that an umlaut?) are treated as
coming after the equivalent lower case letter .... so how do we deal
with that?  Currently as written it deletes them as lower case.  Maybe I
have to go one line at a time to delete?  Does a German version of
NoteTab sort these correctly?  Is it a bug in the sorting engine? Is it
just good old ASCII ordering?  Are only certain letters umlauted, or
whatever the double dots are called, in German?

; by don at htmlfixit.com
^!Menu Edit/Copy All
^!Toolbar Paste New
^!Replace "^P" >> " " ATIWS
^!Replace ")" >> " " ATIWS
^!Replace "(" >> " " ATIWS
^!Replace """ >> " " ATIWS
^!Replace "^T" >> " " ATIWS
^!Replace "," >> " " ATIWS
^!Replace "[" >> " " ATIWS
^!Replace "]" >> " " ATIWS
^!Replace "<" >> " " ATIWS
^!Replace ">" >> " " ATIWS
^!Replace "~" >> " " ATIWS
^!Replace "!" >> " " ATIWS
^!Replace "@" >> " " ATIWS
^!Replace "#" >> " " ATIWS
^!Replace "$" >> " " ATIWS
^!Replace "%" >> " " ATIWS
^!Replace "^" >> " " ATIWS
^!Replace "&" >> " " ATIWS
^!Replace "*" >> " " ATIWS
^!Replace "_" >> " " ATIWS
^!Replace "+" >> " " ATIWS
^!Replace "=" >> " " ATIWS
^!Replace "|" >> " " ATIWS
^!Replace "{" >> " " ATIWS
^!Replace "}" >> " " ATIWS
^!Replace "\" >> " " ATIWS
^!Replace "/" >> " " ATIWS
^!Replace "?" >> " " ATIWS
^!Replace "." >> " " ATIWS
^!Replace ";" >> " " ATIWS
^!Replace ":" >> " " ATIWS
^!Replace "" >> " " ATIWS
^!Replace "•" >> " " ATIWS
^!Replace "– " >> " " ATIWS
^!Replace "´" >> " " ATIWS
^!Replace "”" >> " " ATIWS
^!Replace "“" >> " " ATIWS
^!Replace "‘" >> " " ATIWS
^!Replace "`" >> " " ATIWS


^!Menu Modify/Spaces/Single Space
^!Replace " " >> "^P" ATIWS
^!Replace "^P’" >> "^P" ATIWS
^!Replace "^P-" >> "^P" ATIWS
^!Replace "^P " >> "^P" ATIWS
^!Menu Edit/Copy All
^!SetClipboard ^$StrSort("^$GetClipboard$";1;1;1)$
^!Select All
^!Toolbar Paste

^!Set %LineN%=0
:DumpNumbers
;^!SetDebug 1
^!Inc %LineN% 10
^!Jump ^%LineN%
^!IfTrue ^$IsEmpty("^$GetLine$")$ DumpNumbers
^!Select +1
^!If "^$IsNumber("^$GetSelection$")$" = "1" DumpNumbers ELSE NotNumber
:NotNumber
^!Jump -1
^!Select +1
^!If "^$IsNumber("^$GetSelection$")$" = "0" NotNumber ELSE DeleteNumbers

:DeleteNumbers
^!Jump +1
^!SelectTo 1:1
^!Continue is proper highlighted

^!Keyboard DELETE


^!Set %LineN%=^$GetLineCount$
:DumpLowers
^!Inc %LineN% -100
^!Jump ^%LineN%
^!Select +1
^!If "^$IsUppercase("^$GetSelection$")$" = "0" DumpLowers ELSE NotLower
:NotLower
^!Jump +1
^!Select +1
^!If "^$IsUppercase("^$GetSelection$")$" = "1" NotLower ELSE DeleteLowers

:DeleteLowers
^!Jump Select_Start
^!Set %cursor_row%=^$GetRow$
^!Set %cursor_col%=^$GetCol$
^!Jump Doc_End
^!SelectTo ^%cursor_row%:^%cursor_col%
^!Continue Is Proper Highlighted
^!Keyboard DELETE

#12905 From: Jody <kjv-av1611@...>
Date: Sat Dec 4, 2004 2:52 am
Subject: Re: [Clip] Removing numbers from a list
notetabber
Send Email Send Email
 
Hi Abair & Alec,

>--- In ntb-clips@yahoogroups.com, "Alec Burgess" <burale@a...> wrote:
>> > Placing quotes around the search string ALSO confuses
>> > NoteTab at times.
>>
>> FWIW, I've found the most unambiguous notation for replace
>> strings in regexp clip lines is:
>>
>> ^!replace "find-string-quoted" >> "replace-string-quoted" R
>> and-other-options
>>
>> Regards ... Alec
>
>Hehehe,
>
>so which is i, to find the string-quoted at the start of a line?
>
>^!Find ^"string-quoted"
>^!Find "^string-quoted" ?
>
>Varies depeding on what else is in the string.

Could one of you kindly tell me what in the world you are talking
about starting right after the for what it's worth? You have me
completely lost. Thanks!

See ya in the funnies,
Jody Adair, Prov. 15:15

Blessed are they who can laugh at themselves
   for they shall never cease to be amused.
        http://www.clean-funnies.com

#12906 From: "Don - htmlfixit.com" <don@...>
Date: Sat Dec 4, 2004 4:30 am
Subject: Re: [Clip] Re: Extracting words from a file
dpasseng
Send Email Send Email
 
Even better, saves the German Characters

; by don at htmlfixit.com
; runs a text file and makes
; a list of all words that start
; with a capital letter
^!Menu Edit/Copy All
^!Toolbar Paste New
^!Replace "^P" >> " " ATIWS
^!Replace ")" >> " " ATIWS
^!Replace "(" >> " " ATIWS
^!Replace """ >> " " ATIWS
^!Replace "^T" >> " " ATIWS
^!Replace "," >> " " ATIWS
^!Replace "[" >> " " ATIWS
^!Replace "]" >> " " ATIWS
^!Replace "<" >> " " ATIWS
^!Replace ">" >> " " ATIWS
^!Replace "~" >> " " ATIWS
^!Replace "!" >> " " ATIWS
^!Replace "@" >> " " ATIWS
^!Replace "#" >> " " ATIWS
^!Replace "$" >> " " ATIWS
^!Replace "%" >> " " ATIWS
^!Replace "^" >> " " ATIWS
^!Replace "&" >> " " ATIWS
^!Replace "*" >> " " ATIWS
^!Replace "_" >> " " ATIWS
^!Replace "+" >> " " ATIWS
^!Replace "=" >> " " ATIWS
^!Replace "|" >> " " ATIWS
^!Replace "{" >> " " ATIWS
^!Replace "}" >> " " ATIWS
^!Replace "\" >> " " ATIWS
^!Replace "/" >> " " ATIWS
^!Replace "?" >> " " ATIWS
^!Replace "." >> " " ATIWS
^!Replace ";" >> " " ATIWS
^!Replace ":" >> " " ATIWS
^!Replace "" >> " " ATIWS
^!Replace "•" >> " " ATIWS
^!Replace "– " >> " " ATIWS
^!Replace "´" >> " " ATIWS
^!Replace "”" >> " " ATIWS
^!Replace "“" >> " " ATIWS
^!Replace "‘" >> " " ATIWS
^!Replace "`" >> " " ATIWS


^!Menu Modify/Spaces/Single Space
^!Replace " " >> "^P" ATIWS
^!Replace "^P’" >> "^P" ATIWS
^!Replace "^P-" >> "^P" ATIWS
^!Replace "^P " >> "^P" ATIWS
^!Menu Edit/Copy All
^!SetClipboard ^$StrSort("^$GetClipboard$";1;1;1)$
^!Select All
^!Toolbar Paste
^!Jump 1

:DumpBad
^!Select +1
^!IfError END
^!IfTrue ^$IsEmpty("^$GetLine$")$ NEXT ELSE SKIP_2
^!Keyboard DELETE
^!GoTo DumpBad

^!If "^$IsNumber("^$GetSelection$")$" = "1" SKIP
^!If "^$IsUppercase("^$GetSelection$")$" = "1" SKIP_4
^!Select Eol
^!Keyboard DELETE
^!Keyboard DELETE
^!GoTo DumpBad

:GoNext
^!Jump +1
^!GoTo DumpBad

#12907 From: "Alan C." <acumming@...>
Date: Sat Dec 4, 2004 4:43 am
Subject: Re: [Clip] Removing numbers from a list
acummingsus
Send Email Send Email
 
On Fri, 03 Dec 2004 22:47:20 -0000, abairheart wrote:
[ . . ]
> so which is i, to find the string-quoted at the start of a line?
>
> ^!Find ^"string-quoted"
> ^!Find "^string-quoted" ?

Supposed to be (I think) all inside the quotes with nothing to the left of the
left hand quote.

Have you also tested/tried:

^!Find "^(string-quoted)"

()

grouping.  above, just 1 group.  next, 3 potential to find (each of the 3 is a
group)

^!Find "^(string-quoted1)|(string-quoted2)|(string-quoted3)"

--
Alan.

#12908 From: "Don - htmlfixit.com" <don@...>
Date: Sat Dec 4, 2004 4:55 am
Subject: Re: IsUppercase and IsLowercase will show positive
dpasseng
Send Email Send Email
 
; by don at htmlfixit.com
; any-non lowercase non-alphabetic
; character tests positive as Uppercase
^!SetArray
%Original%="0";"1";"|";"?";"a";"@";"1";"+";"=";"F";"`";"~";"-";"q";"L";"[";"}";"
";"x"
^!Set %count%=0
:Loop
^!Inc %count%
^!If "^%count%" > "^%Original0%" End

^!If "^$IsUppercase("^%Original^%count%%")$" = "1" UPPER ELSE NOTUPPER

:UPPER
^!Info "^%Original^%count%%" is POSITIVE when tested as upper case --
even if it isn't a letter
^!GoTo Loop

:NOTUPPER
^!Info "^%Original^%count%%" is negative when tested as upper case
^!GoTo Loop


Most interesting!  IsUppercase is really NotLowercase!  You would think
that IsUppercase would first verify that the character is alphabetic,
but it doesn't.  IsLowercase works the same too, so it is really
NotUppercase.  Because of this you first need to check I guess to be
sure it is alphabetic.

These results are consistent I guess with what help says:
^$IsUppercase("Str")$ (added in v4.8)
Returns 1 if Str does not contain any lowercase characters, and 0 if it
does.

I would think it SHOULD be does not contain any lowercase or
non-alphabetic characters.  But I guess you could have a contraction or
hyphenated, etc.  So maybe that isn't correct.  In any event, just be
aware and code accordingly.

#12909 From: "Hugo Paulissen" <hugopaulissen@...>
Date: Sat Dec 4, 2004 12:03 pm
Subject: Re: Extracting words from a file
hugo_paulissen
Send Email Send Email
 
>
> I just happend across this thread. If I have understood your needs
> correctly, why not just reduce the list to a single column of
words ,
> and sort them case sensitive?
>
> 1. Replace all spaces in the document with "^P" to change the list
to
> individual words (ignore puntuation, if you like.
>
> 2. Sort the list CASE SENSITIVE
>
> 3. Delete the lower case words
>
>
> 500 K files should contain about 80,000 words or so. Shouldn't take
> more than a few minutes to do this by hand. If you have a lot of
> files you can always write down the keystrokes you use, then do the
> sort by Menu commands (^!Menu Modify/...). I think there's a
> configuration switch to change sorting behaviour (remove duplicates
> or not; case sensitive or not).
>
>
> Abair



We're going around in circles...

Isn't this what I proposed a few messages earlier?

> What about this approach? You can easily see for yourself if this
is
> of any help.
>
> 1. replace " " with "^P" - don't know how fast that would be
> 2. trim/left align the text (which should have most words on a
> separate line by now)
> 3. sort the document with [Case Sensitive Sorting] and [Remove
> Duplicates] switched on (in options)
>
> Hugo
>

#12910 From: "Hugo Paulissen" <hugopaulissen@...>
Date: Sat Dec 4, 2004 12:22 pm
Subject: RE: [Clip] Re: Extracting words from a file
hugo_paulissen
Send Email Send Email
 
Don,

You wrote the kind of clip I had in mind and for which I didn't have the
time. It was clear that NoteTab's regex was in the way... ;-). If I had the
need for this clip I would definitely test it!

Hugo

> -----Oorspronkelijk bericht-----
> Van: Don - htmlfixit.com [mailto:don@...]
> Verzonden: zaterdag 4 december 2004 3:37
> Aan: ntb-clips@yahoogroups.com
> Onderwerp: Re: [Clip] Re: Extracting words from a file
>
>
>
> > Hi Franz,
> >
> > I just happend across this thread. If I have understood your needs
> > correctly, why not just reduce the list to a single column of words ,
> > and sort them case sensitive?
> >
> > 1. Replace all spaces in the document with "^P" to change the list to
> > individual words (ignore puntuation, if you like.
> >
> > 2. Sort the list CASE SENSITIVE
> >
> > 3. Delete the lower case words
> >
> >
> > 500 K files should contain about 80,000 words or so. Shouldn't take
> > more than a few minutes to do this by hand. If you have a lot of
> > files you can always write down the keystrokes you use, then do the
> > sort by Menu commands (^!Menu Modify/...). I think there's a
> > configuration switch to change sorting behaviour (remove duplicates
> > or not; case sensitive or not).
> >
> >
> > Abair
>
> Bingo Abair, with one exception that pertains to German, but not to
> English!  It works and doesn't use regex.  I tried it on the 500 lines
> sent by Franz and on my 181,000 word file I have been trying with all
> others (always an out of memory error until now).  I used a clip to do
> it as shown below.  There is one problem however ... the German
> characters with two dots over them (is that an umlaut?) are treated as
> coming after the equivalent lower case letter .... so how do we deal
> with that?  Currently as written it deletes them as lower case.  Maybe I
> have to go one line at a time to delete?  Does a German version of
> NoteTab sort these correctly?  Is it a bug in the sorting engine? Is it
> just good old ASCII ordering?  Are only certain letters umlauted, or
> whatever the double dots are called, in German?
>
> ; by don at htmlfixit.com
> ^!Menu Edit/Copy All
> ^!Toolbar Paste New
> ^!Replace "^P" >> " " ATIWS
> ^!Replace ")" >> " " ATIWS
> ^!Replace "(" >> " " ATIWS
> ^!Replace """ >> " " ATIWS
> ^!Replace "^T" >> " " ATIWS
> ^!Replace "," >> " " ATIWS
> ^!Replace "[" >> " " ATIWS
> ^!Replace "]" >> " " ATIWS
> ^!Replace "<" >> " " ATIWS
> ^!Replace ">" >> " " ATIWS
> ^!Replace "~" >> " " ATIWS
> ^!Replace "!" >> " " ATIWS
> ^!Replace "@" >> " " ATIWS
> ^!Replace "#" >> " " ATIWS
> ^!Replace "$" >> " " ATIWS
> ^!Replace "%" >> " " ATIWS
> ^!Replace "^" >> " " ATIWS
> ^!Replace "&" >> " " ATIWS
> ^!Replace "*" >> " " ATIWS
> ^!Replace "_" >> " " ATIWS
> ^!Replace "+" >> " " ATIWS
> ^!Replace "=" >> " " ATIWS
> ^!Replace "|" >> " " ATIWS
> ^!Replace "{" >> " " ATIWS
> ^!Replace "}" >> " " ATIWS
> ^!Replace "\" >> " " ATIWS
> ^!Replace "/" >> " " ATIWS
> ^!Replace "?" >> " " ATIWS
> ^!Replace "." >> " " ATIWS
> ^!Replace ";" >> " " ATIWS
> ^!Replace ":" >> " " ATIWS
> ^!Replace "" >> " " ATIWS
> ^!Replace "•" >> " " ATIWS
> ^!Replace "– " >> " " ATIWS
> ^!Replace "´" >> " " ATIWS
> ^!Replace "”" >> " " ATIWS
> ^!Replace "“" >> " " ATIWS
> ^!Replace "‘" >> " " ATIWS
> ^!Replace "`" >> " " ATIWS
>
>
> ^!Menu Modify/Spaces/Single Space
> ^!Replace " " >> "^P" ATIWS
> ^!Replace "^P’" >> "^P" ATIWS
> ^!Replace "^P-" >> "^P" ATIWS
> ^!Replace "^P " >> "^P" ATIWS
> ^!Menu Edit/Copy All
> ^!SetClipboard ^$StrSort("^$GetClipboard$";1;1;1)$
> ^!Select All
> ^!Toolbar Paste
>
> ^!Set %LineN%=0
> :DumpNumbers
> ;^!SetDebug 1
> ^!Inc %LineN% 10
> ^!Jump ^%LineN%
> ^!IfTrue ^$IsEmpty("^$GetLine$")$ DumpNumbers
> ^!Select +1
> ^!If "^$IsNumber("^$GetSelection$")$" = "1" DumpNumbers ELSE NotNumber
> :NotNumber
> ^!Jump -1
> ^!Select +1
> ^!If "^$IsNumber("^$GetSelection$")$" = "0" NotNumber ELSE DeleteNumbers
>
> :DeleteNumbers
> ^!Jump +1
> ^!SelectTo 1:1
> ^!Continue is proper highlighted
>
> ^!Keyboard DELETE
>
>
> ^!Set %LineN%=^$GetLineCount$
> :DumpLowers
> ^!Inc %LineN% -100
> ^!Jump ^%LineN%
> ^!Select +1
> ^!If "^$IsUppercase("^$GetSelection$")$" = "0" DumpLowers ELSE NotLower
> :NotLower
> ^!Jump +1
> ^!Select +1
> ^!If "^$IsUppercase("^$GetSelection$")$" = "1" NotLower ELSE DeleteLowers
>
> :DeleteLowers
> ^!Jump Select_Start
> ^!Set %cursor_row%=^$GetRow$
> ^!Set %cursor_col%=^$GetCol$
> ^!Jump Doc_End
> ^!SelectTo ^%cursor_row%:^%cursor_col%
> ^!Continue Is Proper Highlighted
> ^!Keyboard DELETE
>

Messages 12881 - 12910 of 23787   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help