How to install Hunspell?

English main discussion
  • Author
  • Message
Offline
Posts: 282
Joined: Thu Sep 10, 2015 9:53 am
Location: Deutschland

How to install Hunspell?

Post by sexy96 »

Mam plik: DSpellCheck.dll
Umieściłem go w D:\Notepad++\plugins\

oraz katalog: Hunspell
umieściłem w D:\Notepad++\plugins\Config\

w katalogu Hunspell są 2 pliki:
pl_PL.aff
pl_PL.dic

po uruchomieniu Notepad++ w pluginach pokazał się
DSpellCheck wraz z opcjami.

Image


Hunspell umieściłem w tym samym katalogu co Aspell.
a DSpellCheck.dll w katalogu plugs.

Co zrobić, aby w AkelPad "Plugs" też był widoczny?

Image
Last edited by sexy96 on Sun Feb 05, 2017 10:58 am, edited 1 time in total.

Offline
Posts: 2248
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

sexy96
That will not work that way. AkelPad is not magic, and even has not human brain, it cannot guess what is hell "DSpellCheck.dll" and how to handle it.
In order to make AkelPad to recognize something, you need write plugin - special DLL, which implements special API, and behave according rules. Then, if you want plugin functions too be shown in various menus and toolbars, you must configure that manually. SpellCheck.DLL is such plugin, and it does what it programmed to do - uses ASpell for spellchecking purposes, and if ASpell says "word is wrong" SpellCheck either marks this word in editor or asks ASpell for correct variants to show to user, depends of use case. SpellCheck.dll will not recognize Hunspell either, because it is also not magical.

Offline
Posts: 282
Joined: Thu Sep 10, 2015 9:53 am
Location: Deutschland

Post by sexy96 »

This is the ASpell,
Image
Such words I could write a few thousand.

and it looks like Hunspell.
Image
Last edited by sexy96 on Sun Feb 05, 2017 10:59 am, edited 1 time in total.

Offline
Posts: 2248
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

sexy96, did you installed Poland dictionary for ASpell?
NB: SpellCheck works only in 32bit AkelPad.

Offline
Posts: 282
Joined: Thu Sep 10, 2015 9:53 am
Location: Deutschland

Post by sexy96 »

Exactly. I have a 32 bit AkelPad because ASpell.
The underlined words are examples of words that Aspell does not recognize.
But tst I will write the text in Notepad ++ because it uses Hunspell.

Offline
Posts: 2248
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

sexy96
Did you configure SpellCheck plugin? Go to Settings. There is ComboBox list "Default dictionary". Does that list has at least any item(polish I expect). I suspect plugin not autodetected ASpell location. You should check field "Aspell core path" - browse for file aspell-15.dll inside Aspell installation directory.
Last edited by FeyFre on Tue Oct 18, 2016 12:28 pm, edited 1 time in total.

Offline
Posts: 282
Joined: Thu Sep 10, 2015 9:53 am
Location: Deutschland

Post by sexy96 »

ASpell highlights the 2 words.
Image
Hunspell nothing highlights and it is well.

ASpell in Notepad ++ worse acts.
Last edited by sexy96 on Sun Feb 05, 2017 11:00 am, edited 1 time in total.

Offline
Posts: 2248
Joined: Tue Aug 07, 2007 2:03 pm
Location: Vinnitsa, Ukraine

Post by FeyFre »

Can you tell me if that text can be safely saved in iso8859-2 endcoding?
Save, close, and open again. It should not popup warning message about "bad" symbols, and in reopened file you must not find any differences.

There is no ideal spellchecker and ideal dictionary, perhaps polish dictionary is not that full as Hunspells. You can try download recent dictionary from aspell site.

Offline
Posts: 282
Joined: Thu Sep 10, 2015 9:53 am
Location: Deutschland

Post by sexy96 »

ISO 8859-2 -> Eastern

and I have
Win 1250 ANSI-Central Europe


This is the original text
Image

it is converted and saved
Image

and this is the opening
Image
Last edited by sexy96 on Sun Feb 05, 2017 11:01 am, edited 1 time in total.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

Polish Aspell dictionary is not complete. Eg. is missing:
naszą
prześladowań
narody
zjednoczeni

FeyFre
Is it possible to add some words to the dictionary or to create own dictionary?

Offline
Posts: 282
Joined: Thu Sep 10, 2015 9:53 am
Location: Deutschland

Post by sexy96 »

Nic do niego nie można dodać w przeciwieństwie do Hunspell.
Nawet gdyby szło, to brakuje tam tysiące wyrazów.

ASpell w Notepad++ zatrzymuje się na każdym wyrazie,
który zawiera polskie znaki i czyta pierwszą część wyrazu
przed polskimi znakami, a następnie pozostałą część
wyrazu za polskimi znakami.

Idealnie by było gdyby szło zaadoptować Hunspell lub WORD'a
a by pokazywał po otwarciu tekstu, niepoprawne wyrazy
poprzez ich zaznaczenie.

W Akelpad, mam WORD częściowo zaadoptowany do sprawdzania tekstu,
ale podczas sprawdzania tekst nie przesuwa się
do miejsca gdzie jest sprawdzany wyraz.
Jak również zaraz po zakończeniu sprawdzania tekst się minimalizuje
i trzeba ponownie go maksymalizować, aby zapisać zmiany.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

sexy96
Znalazłem rozwiązanie, jak utworzyć własny słownik Aspell:

Code: Select all

aspell.exe --lang=pl create master ./pl.rws < pl_words.txt
Plik pl_words.txt musi być zapisany jako ISO-8859-2 i zawierać listę słów (po jednym w każdym wierszu).

Offline
Posts: 282
Joined: Thu Sep 10, 2015 9:53 am
Location: Deutschland

Post by sexy96 »

Gdzie to zapisać? Do AkelPad.ini?
Code:
aspell.exe --lang=pl create master ./pl.rws < pl_words.txt

Sadzę, że to będą dziesiątki tysięcy wyrazów, biorąc pod uwagę różne odmiany i przypadki, rodzaje i liczby pojedyncze lub mnogie.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

sexy96
Oto moja instrukcja, jak zrobić polski słownik do Aspell.

Pobierz archiwum z listą polskich słów z tej strony: http://sjp.pl/slownik/growy/
Wypakuj z archiwum plik slowa.txt do katalogu, w którym jest aspell.exe (...\aspell\bin).
Przejdź do tego katalogu.
Otwórz w AkelPad plik slowa.txt jako UTF-8 (uwaga - plik jest bez BOM).
Zapisz ten plik jako 28592 (ISO 8859-2).
Z linii polecenia uruchom:

Code: Select all

aspell.exe --lang=pl create master ./pl.rws < slowa.txt
Po kilku sekundach powinien być gotowy słownik pl.rws.
Plik slowa.txt można skasować, nie będzie już potrzebny.
Plik pl.rws należy przenieść do katalogu, w którym są słowniki (...\aspell\dict).

W ten sposób masz polski słownik w Aspell, chyba taki sam jak w Hunspell.
Nowy słownik zawiera 2734053 słowa, ok. dwa razy więcej niż stary.

Offline
Posts: 282
Joined: Thu Sep 10, 2015 9:53 am
Location: Deutschland

Post by sexy96 »

Bardzo dobrze działa.
Dołożyłem jeszcze ponad 100 tys. wyrazów.

Wielkie dzięki :D
Post Reply