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

Re: [NTB] delete from custom dictionary

Expand Messages
  • hsavage
    ... da5whitman, Here are 6 clips aimed at editing the udt file. Written by Jody, I ve used them before with success. I ve sent them in 2 states, first, they
    Message 1 of 1 , Apr 8 3:18 PM
    • 0 Attachment
      > On 4/8/02 12:33 PM, da5idwhitman wrote:
      > > I accidentally added a couple mis-spelled words into a custom
      > > dictionary, and would (obviously) like to delete them.
      > >
      > > I opened up the dictionary file in NTP, and see the incorrect words,
      > > but the file looks like is has some...structure...it's not just a
      > > simple list of words.
      > >
      > > I'm a little afraid that if I just delete lines, the thing will get
      > > munged up. Can I safely edit the dictionary files? Do I need to
      > > patch up the line that specifies the number of words? Do I need to
      > > renumber all the entries to fill in any gaps I introduce by deleting
      > > lines?
      > >
      > >

      da5whitman,

      Here are 6 clips aimed at editing the udt file. Written by Jody, I've
      used them before with success.

      I've sent them in 2 states, first, they are formatted to prevent long
      lines from wrapping when shipped via email. The second clip is easy to
      de-format if you follow the instructions in the first clip.

      Since there aren't too many long lines I, also, pasted them below the
      next 2 clip as they appear in my clipbook. If you have trouble with the
      first 2, you can resort to searching for the wrapped lines in the last
      batch of clips.

      hrs


      H="ECW_RESTORE"
      ; ***IMPORTANT***
      ; SIMPLEST METHOD
      ;
      ; COPY BOTH THESE
      ; CLIPS TO A BLANK DOC.
      ;
      ; CUT FIRST CLIP TO THE CLIPBOARD,
      ; ADD/PASTE INTO ANY CLIPBOOK!
      ;
      ; SELECT THE REMAINING TEXT AND
      ; RUN THIS CLIP ON IT TO DE-FORMAT!
      ;
      ^!Clearvariables
      ^!SetWordwrap 0
      ^!SetScreenUpdate 0
      ^!ToolBar E-Mail UnQuote
      ^!Replace "^p" >> "" TIwHSA
      ^!Replace "ºtº" >> "^t" TIwHSA
      ^!Replace "ºsº" >> " " TIwHSA
      ^!Replace "ºrº" >> "^p" TIwHSA
      ^!Replace "ºcº" >> "^" TIwHSA


      H="date/time"ºrº_ºcº$GetDate(mmddyy_hhnnss)$º
      rººrººrºH="OpenºsºDefault.udt"ºrººcº!Openºsºº
      cº$GetAppPath$Dictionaries\Default.udtºrººrºº
      rºH="Openºsº*.udt"ºrº;ºsºLastºsºupdatedºsºonº
      sº11-09-2001,ºsº07:12am,ºsºjodyºrººcº!Openºsº
      ºcº?{(T=O;F="UserºsºDefinedºsºDictionaries|*.
      udt")Yourºsº*.udtºsºfilesºsºmayºsºbeºsºinºsºN
      oteTabºsºorºsºDictionaries=ºcº$GetAppPath$}ºr
      ººrººrºH="DeleteLine"ºrººcº!DeleteLineºrººrºº
      rºH="Edit.udt"ºrº;ºsºLastºsºupdatedºsºonºsº11
      -09-2001,ºsº07:12am,ºsºjodyºrººcº!SetHintInfo
      ºsºReformattingºsººcº$GetDocName$...ºrººcº!Se
      tScreenUpdateºsºOffºrººcº!Jumpºsº3ºrººcº!Setº
      sº?Counter?=0ºrº:Loopºrººcº!Findºsº"="ºsºSºrº
      ºcº!IfSameºsº"ºcº$GetLine(-1)$"ºsº"[AutoºsºCo
      rrect]"ºsºListCountºrººcº!SelectºsºBolºrººcº!
      InsertTextºsºIGN_ºcº?Counter?=ºrººcº!Jumpºsº+
      1ºrººcº!Incºsº?Counter?ºrººcº!GotoºsºLoopºrº:
      ListCountºrººcº!Findºsº"IGN_ListCount="ºsºSBI
      ºrººcº!IfErrorºsºInfoºrººcº!SelectºsºEolºrººc
      º!InsertTextºsºIGN_ListCount=ºcº?Counter?ºrºº
      cº!Jumpºsº1ºrººrººrºH="Mergeºsº.udt's"ºrº;ºsº
      Lastºsºupdatedºsºonºsº11-09-2001,ºsº07:12am,º
      sºjodyºrº;ºsºCopyºsº.udt'sºsºintoºsºoneºsºnew
      ºsºdoc.ºsºDeleteºsºtheºsºfollowingºsºlinesºrº
      ;ºsºfromºsºeachºsº.udt'sºsºcopyºsºandºsºrunºs
      ºscriptºsºoverºsºdocumentsºrº;ºsº[Added]ºrº;º
      sºIGN_ListCount=nnnºrº;ºsº[AutoºsºCorrect]ºrº
      ;ºsºAC_ListCount=nnnºrº;ºsºReplaceºsºexisting
      ºsº.udtºsºwithºsºtheºsºmergedºsºwords.ºsº(Not
      e:ºsºtheºrº;ºsº[AutoReplace]ºsºisºsºsetºsºtoº
      sºzero.ºsºBeºsºcarefulºsºnotºsºtoºsºuseºrº;ºs
      ºtheºsºoneºsºinºsºtheºsºnewºsºudtºsºmadeºsºif
      ºsºyouºsºhaveºsºanºsºexistingºsºautoºrº;ºsºco
      rrectºsºlist.ºrººcº!SetHintInfoºsºReformattin
      gºsººcº$GetDocName$...ºrººcº!SetScreenUpdateº
      sºOffºrººcº!Replaceºsº"IGN_\d+="ºsº>>ºsº""ºsº
      WASRºrººcº!Replaceºsº"ºcºpºcºp"ºsº>>ºsº"ºcºp"
      ºsºWASºrººcº!IfErrorºsºNextºsºelseºsºSkip_-1º
      rººcº!SelectºsºAllºrººcº$StrSort("ºcº$GetText
      $";1;1;1)$ºrººcº!Jumpºsº1ºrººcº!Setºsº?Counte
      r?=0ºrº:Loopºrººcº!Ifºsººcº$GetRow$ºsº=ºsººcº
      $GetLineCount$ºsºListCountºrººcº!InsertTextºs
      ºIGN_ºcº?Counter?=ºrººcº!Jumpºsº+1ºrººcº!Incº
      sº?Counter?ºrººcº!GotoºsºLoopºrº:ListCountºrº
      ºcº!InsertTextºsººcºp[AutoºsºCorrect]ºcºpAC_L
      istCount=0ºcºpºrººcº!Jumpºsº1ºrººcº!InsertTex
      tºsº[Added]ºcºpIGN_ListCount=ºcº?Counter?ºcºp
      ºrººrººrº

      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

      H="date/time"
      _^$GetDate(mmddyy_hhnnss)$


      H="Open Default.udt"
      ^!Open ^$GetAppPath$Dictionaries\Default.udt


      H="Open *.udt"
      ; Last updated on 11-09-2001, 07:12am, jody
      ^!Open ^?{(T=O;F="User Defined Dictionaries|*.udt")Your *.udt files may
      be in NoteTab or Dictionaries=^$GetAppPath$}


      H="DeleteLine"
      ^!DeleteLine


      H="Edit.udt"
      ; Last updated on 11-09-2001, 07:12am, jody
      ^!SetHintInfo Reformatting ^$GetDocName$...
      ^!SetScreenUpdate Off
      ^!Jump 3
      ^!Set ?Counter?=0
      :Loop
      ^!Find "=" S
      ^!IfSame "^$GetLine(-1)$" "[Auto Correct]" ListCount
      ^!Select Bol
      ^!InsertText IGN_^?Counter?=
      ^!Jump +1
      ^!Inc ?Counter?
      ^!Goto Loop
      :ListCount
      ^!Find "IGN_ListCount=" SBI
      ^!IfError Info
      ^!Select Eol
      ^!InsertText IGN_ListCount=^?Counter?
      ^!Jump 1


      H="Merge .udt's"
      ; Last updated on 11-09-2001, 07:12am, jody
      ; Copy .udt's into one new doc. Delete the following lines
      ; from each .udt's copy and run script over documents
      ; [Added]
      ; IGN_ListCount=nnn
      ; [Auto Correct]
      ; AC_ListCount=nnn
      ; Replace existing .udt with the merged words. (Note: the
      ; [AutoReplace] is set to zero. Be careful not to use
      ; the one in the new udt made if you have an existing auto
      ; correct list.
      ^!SetHintInfo Reformatting ^$GetDocName$...
      ^!SetScreenUpdate Off
      ^!Replace "IGN_\d+=" >> "" WASR
      ^!Replace "^p^p" >> "^p" WAS
      ^!IfError Next else Skip_-1
      ^!Select All
      ^$StrSort("^$GetText$";1;1;1)$
      ^!Jump 1
      ^!Set ?Counter?=0
      :Loop
      ^!If ^$GetRow$ = ^$GetLineCount$ ListCount
      ^!InsertText IGN_^?Counter?=
      ^!Jump +1
      ^!Inc ?Counter?
      ^!Goto Loop
      :ListCount
      ^!InsertText ^p[Auto Correct]^pAC_ListCount=0^p
      ^!Jump 1
      ^!InsertText [Added]^pIGN_ListCount=^?Counter?^p
    Your message has been successfully submitted and would be delivered to recipients shortly.