Jump to content

Recommended Posts

Posted (edited)

Thank you for this information. I stop searching for custom dictionary files. As I said earlier personally I'm not interested in spelling but hyphenation is essential to me. There is a possibility to make a separate tool for updating original fi_FI.dic file but I think it may be waste of time. For a quick look this file seems to have a repeating pattern 

feLP+emaN --- CustomWord --- DIU_

so it is quite easy to find out words that have been added to the custom dictionary. There are some symbols which integer values are less than 32 (minus signs in the example) , but those can be filtered out. I don't promise anything, but I can spend some hours in Christmas holidays trying to figure out how to make spelling better by updating the original fi_FI.dic file from the custom dictionary. I wonder if it is possible to crate some kind of algorithm to create most common cases too (not all 15, but most often used). I must study Voikko and perhaps some AI-tools can be used to create cases.

Edited by MikaV
Posted
1 hour ago, lacerto said:

I think that the user-added words are saved in "C:\Users\<your account>\AppData\Roaming\Affinity\Publisher\1.0\user\dictionary.propcol" (version 1), and "C:\Users\<your account>\.affinity\Common\2.0\user\dictionary.propcol"  (version 2) but it seems to be binary so no easy way to add words.

EDIT: On the other hand, it is possible to add words en masse into the fi_FI.dic basic dictionary, which is ANSI and just update the word (line) count. I suppose the added words should be in alphabetical order:

added_finnish_word.thumb.png.6c4ec8e172440c62cc23a0c1180916c7.png

That's what I have in mind. If you add a word into the custom dictionary it's a single case. But if you have a piece of software which reads the custom dictionary and adds the word and it's most important cases into the main dictionary. Then you have "vara-apulaisulkomaankauppaministeri", "vara-apulaisulkomaankauppamisterille", and so forth. Finnish is so complicated: cases, aspiration etc. But fortunately there are very few exceptions in the language. May be it's worth of trying. Original fi_FI.dic can be scanned for words to be added. If they are not found, append them to the file, sort lines to alphabetical order and update the row count. I this way resulting dictionary would be huge in size after couple of thousands updates, but modern computers probably can handle file without significant delays

  • 1 month later...
Posted

There is now a repository in Github where you can find Finnish dictionaries and also a tool to add words to the spelling dictionary. Tool is kind of a beta version, but allows adding new words, sorting, removing duplicates and correcting the value of the word counter in the spelling dictionary. There is also an option to add words from Joukahainen xml based Finnish dictionary. There are some instructions also in the readme file and Wiki pages of the repository. Link to the repository is here: https://github.com/MikaVainio/AffinityPublisherFISpelling. I promised lacerto to try to make a tool. Unfortunately it is not possible to make modern spelling tool based on the Hunspell algorithm. I also decided not to implement reading of Publisher's custom dictionary, because Publisher reads Finnish spelling dictionary only at startup. But you may try the tool. At least there is now a place where you can find all the files needed for Finnish hyphenation and spell checking. At the moment I have been able to expand my spelling dictionary to 120 000 words in Windows by combining Hunspell and Joukahainen dictionaries. With my MAC I use operating system's spelling but hyphenation is made with hyphenation dictionary found in the repository. It seems to hyphenate correctly as the Auto option does not.

  • 2 weeks later...
Posted

Hello MikaV,

Thanks for this repository. I can confirm that the files work also in a competing product (in my case, Xara Designer X11). I managed this by changing the names of the files to ru-RU locale, and using Russian as the language in Xara interface. To make this look ok, I even changed "Russian" to "Finnish" at resource "7183"
in files XaraXEnu.dll and XaraXEng.dll (String Table, 449, 2057) using Resource Hacker. Works perfectly.

I got interested in your Dictionary maintenance system but could not get it to work. I have it installed in Program Files (x86). When I try to run maintainGui.exe, I get the attached fatal errors. My system: Windows 7 64-bit.

fatal.PNG

fatal2.PNG

Posted

I Will rebuild the installer at weekend. It is a clumsy one and you need administrator privileges when saving the settings file for the 1st time. I hope that there are no python version related issues. I dont remember exactly what is the mimimum Windows version for Python 3.9. Perhaps it needs Windows 8 or later. I Will check that during the weekend. 

MikaV 

Posted

Unfortunately I made this tool with Python 3.9 which does not support Windows 7 or earlier. I will rewrite it with Python 3.8 so it supports Windows 7 (but not XP). This may take some days before it will be ready for delivery (I must do work I'm paid for). I will inform you on this chain when it is ready. I will also make better installer than Nullsoft's installer with default settings will produce.

MikaV

  • 2 weeks later...
Posted

Now there is a Windows 7 version on GIthub. Officially my executable builder PyInstaller does not support Windows 7 but according to the documentation builds should be compatible with Windos 7 also. Unfortunately I'm not able to conduct any tests in that platform so you must test the software all by your self (thoug this seems to be common practise nowadays 🤔). Here is the link: https://github.com/MikaVainio/AffinityPublisherFISpelling/releases/tag/v.1.0.3W7

image.png.62a7b1d3d05f7d64308ec7b0c259b503.png

You can now install also dictionaries from installer file. Then just use Windows explorer to copy or move dictionary files to appropriate folders in your system.

  • 5 months later...
Posted

Hey! One more person with major problems getting the Finnish hyphenation working. I have tried all the files I have found here and Put the folder in the right pace and showes the fi_FI folder to the program from Tools. The software isn't even showing the language.

I am using Windows 10 and Affinity Publisher 1

Is there anything else I can do?

Kiitos jo etukäteen!

Posted
4 hours ago, Kmo said:

The software isn't even showing the language.

That probably means that you have the folder named incorrectly or you installed it in the wrong location.

Please show us screenshots of:

  • The Tools page of your application Preferences.
  • The File Explorer window that opens when you click the Open button at the bottom of that Preferences page (below the dictionary folder line).

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.4

  • 1 month later...
Posted

I'm facing the same problem than Kmo. Would be so grateful if someone could help and solve this! I tried all the different dictionary files found from here and got to the point where Finnish is available in language options, so folder name and location are right, but still hyphenation is not working in the document. Here are the screenshots:

 

image.png.db914fc35b29f1261746c44cc6aeafc2.png

image.png.b7d0ae52b748df1b20f84b1ebb697752.png

image.png.72e7e2b890324473dee8dd131bb620a5.png

 

 

Posted
1 hour ago, Opri said:

but still hyphenation is not working in the document.

Do you have auto-hyphenation enabled in the Paragraph panel (or Paragraph Text Style) for the text?

What Hyphenation settings have you specified there?

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.4

Posted

As Walt said you need auto-hyphenation to be enabled in the Parahgraph settings. A good practise is to create appropriate Text Styles for body text paragraps to be hyphenated. 

In dictionary folder there must be the following files:

image.png.aaa1733fd037a5271631a7f2c3220a13.png

Hyphenation needs the last file in the picture to be present in the folder. First lines of file shoud look like this:

ISO8859-1
c1ha
char1se
1ba
1be
1bi
1bo
1bu

When you write or place text parahgraph settings must have hyphenation enabled as in the following picture:

image.png.e493b6ada153ddbd830a696640cf0da2.png

 

Create a style for the text to be hyphenated. Also check that there is no conflict between paragraph and style settings if you havent created a particular style for your text. Also keep in mind if you change style or paragraph settings on the fly, new settings won't affect text which have typed or imported before changing the setting. 

image.png.ce4c4957d8ab1738edc3c677fe658458.png

I'll hope this will help you start hyphenating your texts.

 

MikaV

Posted

I realized that there is a block of hyphenation patterns in a wrong place in the hyph_fi_FI.dic file. Patterns should be in alphabetical order. Thus this does not affect to the hyphenation process. I will enclose some pictures clarifying how to create style for body text paragraph in Finnish language. 

  1. In Text styles palette use right mouse button to create a new style based on Body
  2. This opens a dialog "Create Paragraph Style"
  3. Give style a name eg. Leipä (Body style in Finnish)image.png.45c7ef0d542725467e90fdadb2820727.png
  4. Choose Language and set spelling and hyphenation to Finnishimage.png.2753be7069c463fe3032b12c3c6dd85d.png
  5. Hyphenation is actually needed with justified paragraphs so let's choose one in the Alignment dropdownimage.png.d29adfbffc63871e77d749310bd892a1.png
  6. Lastly turn hyphenation on and limit consecutive hyphens to 2 or 3
  7.  image.png.88c32e23be012d78e7108dadfe78cf0f.png
  8. Save style py pressing OK.

Now you can type or place text into text frame and set it's style to Leipä. Then you can create other body text styles based on Leipä style when needed.

 

image.png

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.