Skip to main content
1-Visitor
February 25, 2014
Question

Dictionary Removal?

  • February 25, 2014
  • 19 replies
  • 4231 views
I'm hoping this will be an easy one, but I've looked into this a bit over
the years, and have never been able to figure it out.

Our writing incorporates a medical spelling dictionary. This loads in
fine, and is specified in the dcf.

The problem is we also have some internal styles that are getting
overridden by the standard English dictionary. Specifically, our
organization chooses to use "ie" and "eg" without periods. (The English
dictionary corrects them to "i.e." and "e.g.")

I've also tried to explicitly add "ie" and "eg" to our custom dictionary,
but it doesn't seem to override.

Does anyone know of a way to remove these from the standard dictionary, or
some alternative?

- keith

    19 replies

    18-Opal
    February 25, 2014
    Hi Keith--

    Have you tried using "spell -reject i.e." to explicitly instruct Arbortext to treat "i.e." as a misspelled word?

    --Clay
    berard1-VisitorAuthor
    1-Visitor
    February 25, 2014
    I have not... I'm guessing I could add these to an acl script in EditInit?
    I'll give it a shot.

    - keith


    berard1-VisitorAuthor
    1-Visitor
    February 26, 2014
    Just a quick followup:

    Thanks Clay, yes, that did work as expected. I'm still guessing that this
    affects the actual Arbortext installation, and once run, it won't be
    overridden by subsequent patches. For our deployment, however, it still
    does benefit from having this sent out in a patch for all users.

    I tried adding it to a script in my init dir, but it wasn't able to use the
    "spell" command prior to full initialization. I did put it in editinit,
    and it seems to work fine. The only very minor concern is this is being
    called every time a document is loaded, but it doesn't seem to be causing
    any issue.

    Thanks again,
    keith


    18-Opal
    February 26, 2014
    Glad it's working for you. FWIW, I think these entries get stored in aptspell.xml, in the Arbortext working directory (usually $userhome\AppData\Roaming\PTC\Arbortext\Editor). You can check there to make sure your editinit command isn't generating duplicate entries.

    --Clay
    18-Opal
    February 26, 2014
    Well, I just did a quick test, and alas, it does insert duplicate entries with repeated calls to the command. So every time you run editinit, you'll get some duplicate entries in aptspell.xml.

    It looks like you can solve that issue by starting with

    spell -delete i.e.

    to remove all the old references, before inserting it (again). If you always do delete and then reject, you should be able to get just one entry in the custom dictionary for each term.

    --Clay
    berard1-VisitorAuthor
    1-Visitor
    February 26, 2014
    Great call... and yes, it is... back to the drawing board 🙂

    <spellcache>
    <acceptwords>
    <word>ie</word>
    <word>ie</word>
    <word>ie</word>
    <word>eg</word>
    <word>eg</word>
    <word>eg</word>
    <word>eg</word>
    <word>eg</word>
    <word>eg</word>
    <word>eg</word>
    </acceptwords>
    <rejectwords>
    <word>i.e.</word>
    <word>e.g.</word>
    <word>i.e.</word>
    <word>e.g.</word>
    <word>e.g.</word>
    <word>e.g.</word>
    <word>e.g.</word>
    <word>e.g.</word>
    <word>e.g.</word>
    <word>e.g.</word>
    </rejectwords>
    </spellcache>


    berard1-VisitorAuthor
    1-Visitor
    February 26, 2014
    Oh, I guess I should have read your complete email before jumping into
    it... I'll try delete now.


    berard1-VisitorAuthor
    1-Visitor
    February 26, 2014
    Strange... delete seems to work if run in-session, but doesn't seem to
    account for any old entries, so running the following in editinit doesn't
    clear the existing entries if there from a prior session.

    spell -delete e.g.
    spell -delete eg
    spell -reject e.g.
    spell -accept eg

    There might be something funky I could do on document close that I could
    run delete at that time, but now I'm curious if I can put a version of the
    aptspell.xml in my custom deploy somehow... hmm....

    I liken the Arbortext API to peeling an onion, I'm sure I'll hit the core
    at some point.


    18-Opal
    February 26, 2014
    Hi Keith--

    Hmm, that's odd. I didn't try running it from a script.

    You might want to look into the APTSPLREJECT and APTSPLACCEPT environment variables, that might be the easiest way to achieve what you want. You should be able to put a couple of word lists (one for accept, one for reject) on a network share somewhere and have everyone pick them up.

    --Clay
    1-Visitor
    February 26, 2014

    Have you tried putting aptspell.xml in the Arbortext-path\custom\dictionaries subdirectory?


    From help: The custom\dictionaries path is automatically prepended to the dictionaries path at startup. Putting your user-defined dictionaries in the custom\dictionaries subdirectory makes them automatically available, avoiding manual steps to add them to the path.