What does en-prepl do and how does it work

2. Help
Alan F
2013-03-11
2013-03-13
  • Alan F
    Alan F
    2013-03-11

    Everything appears to be downloaded OK and the spell checking processes work fine. New words can be 'Learn' ed and there is no issue with en.pws.

    However, although the file en-prepl appears to be correctly formatted, with first line reading personal_repl-1.1 en 10 nothing ever seems to happen.

    Is it possible to send replacement word pairs to this file?

    Entering them manually, for example as [badword] [goodword] doesn't damage the file but nothing changes when spell checking.

    Should the [badword] [goodword] pair have some form of delimiter? I use the [] brackets here for the sake of clarity.

     
    Last edit: Alan F 2013-03-11
  • THEVENOT Guy
    THEVENOT Guy
    2013-03-11

    Hi, Alan F,

    In my directory "C:\Program Files\Aspell", as I'm French, I have TWO files :

    A) The file fr.pws :

    personal_ws-1.1 fr n
    Word1
    worD2
    wORd3
    ............
    WORDn

    Just note that ONLY a word with the SAME spelling and the SAME CASE
    will be IGNORED by Spell-Checker and will be "seen" as a CORRECT word.

    For example, Spell-Checker don't stop if it finds the EXACT word worD2 of
    the list, in fr.pws, but stop if it find wORd2, which is NOT in the list !

    Of course, the NUMBER, at the END of the FIRST line is the TOTAL NUMBER
    of the WORDS to ignore


    B) The file fr.prepl :

    personal_repl-1.1 fr 0
    badword1 goodword1
    badword2 goodword21 goodword22
    badword3 goodword31
    badword3 goodword32
    badword3 goodword33
    ................ ...................
    badwordn goodwordn


    BE CAREFULL :

    • The number, at the END of the FIRST line MUST BE 0 ( ZERO ),
      like in my file fr-prepl. I don't know why, but it work !!!

    • ALL these WORDS are separated by a simple SPACE character .

    • A badword, like badword2, can have the set goodword21 goodword22
      proposed as a REPLACEMENT word.

    • A badword, like badword3, can have MORE than ONE goodword :
      ONE goodword on EACH line, ( 3 words in my example ).

    • IMPORTANT : You MUST WRITE ALL your words in lower CASE,

    because :

    • If badword badword1 is found, it proposes the goodword goodword1
    • If badword Badword1 is found, it proposes the goodword Goodword1
    • If badword BADWORD1 is found, it proposes the goodword GOODWORD1

    For ALL OTHERS cases, it depends on the CASE of the FIRST letter :

    • If badword BadWoRd1 is found, it proposes the goodword Goodword1
    • If badword baDwORd1 is found, it proposes the goodword goodword1

    One more thing ! Obviously, the TWO letters "fr", in NAME files
    and on the FIRST line of files, should be replaced by "en",

    I hope that these explanations will be useful to you !

    Best regards

    Guy038

     
    Last edit: THEVENOT Guy 2013-03-11
    • Alan F
      Alan F
      2013-03-12

      Thanks for the advice, much appreciated.

      However, I think that I must still doing something wrong.

      My en.prepl file looks like

      personal_repl-1.1 en 0
      allanf alanf

      but when I do a spell check to test this I see, in the Spell-Checker box:

      Original text: allanf

      Replace by: - allanf

      There is no sign of the alternative text anywhere. I would have expected to see alanf either in the 'Replace by:' box, or somewhere in the list of suggestions below.

      Any ideas??

       
  • THEVENOT Guy
    THEVENOT Guy
    2013-03-12

    Hi, Alan f,

    We forgot an IMPORTANT rule. In the section B) of my
    last post, the USER REPLACEMENT words
    ( goodword1, goodword21,...., goodwordn )
    MUST be CORRECT words for the LANGUAGE you're using !

    So, in your file ""en.prepl", the THREE line below will work.
    And you'll see the words "adult" and "man" and the COMPOUND
    word "good fellow", with corresponding case, in the list,
    in addition to ALL the words, by DEFAULT.

    allanf adult
    allanf good fellow
    allanf man

    BUT, if you add lines like, for example :

    allanf alanf
    allanf notepad's user

    you won't see the two USER REPLACEMENT words "alanf" and
    "notepad's user", because, the word "alanf" is not a
    VALID english word, nor the expression "notepad's user",
    despite the fact that the word user is quite VALID !!

    I did some tests, surrounding the word "alanf" by simple or
    double quotes. But nothing to do : It seems impossible to
    get a misspelled word as a proposed replacement word !?

    One more IMPORTANT thing :

    AFTER the LAST line in your en-prepl file, you MUST
    add a LINE BREAK ( Cursor at BEGINNING of the NEXT EMPTY
    line ). Otherwise, it cause a N++ crash, in my configuration !

    Best regards

    guy038

    P.S. Your configuration file SpellChecker.ini
    in directory ..\Plugins\Config ) should contain
    the THREE lines below :

    [Spell-Checker]
    Current Language=en
    Relative Path=..\Aspell\bin
    
     
    Last edit: THEVENOT Guy 2013-03-12
    • Alan F
      Alan F
      2013-03-13

      Hi,

      Thanks very much for your time and effort.

      Now not only do I now understand the subtleties of the process, it actually works.

      Unless I have overlooked something in the Aspell documentation somewhere I didn't realise that the alternative word, offered as a replacement, has to be already included in the main dictionary. All of my 'testing' had been based around words that did not comply to that rule. Careless of me!

      Basically, I was confusing myself, I suppose. However, your excellent clarification will ensure that I don't make a similar assumption in future.

      The newline, cursor at the beginning of the line, was already in place, and the .ini file is correctly configured.

      Many thanks again for your helpful input and support.

      Much appreciated!

      Alan