German Hyphenation / Nisus Documents on Server

Everything related to our flagship word processor.
Larsemann
Posts: 2
Joined: 2012-01-02 10:49:39

Re: German Hyphenation / Nisus Documents on Server

Post by Larsemann »

I am German and have the same problem with the german hyphenation. It more than terrible in Nisus. So I always have to do it by hand which is quite time consuming. There is a "Duden Korrektor" plug in for Open Office. It would be great if Nisus could be adapted for using this tool as well.
ThomasF
Posts: 5
Joined: 2012-01-28 01:16:34

Re: German Hyphenation / Nisus Documents on Server

Post by ThomasF »

Hello,

I find that the hyphenation is actually pretty good given that only one hyphenation file is used for all languages. But obviously the German hyphenation is not sufficient for long articles or books, the more aggressive hyphenation ("Öfter") in particular creates many mistakes.

I am wondering if Nisus could use the results of some other hyphenation projects. The solr search engine e.g. uses "FOP xml hyphenation patterns" (http://offo.sourceforge.net/hyphenation/) which actually come from hyphenation developed for TeX, see http://ctan.org/tex-archive/language/hy ... hyph-exptl.
There are files which look very similar to Apple's hyphenation file at /System/Library/Frameworks/AppKit.framework/Versions/C/Resources/English-Hyphenation.txt:
See
http://mirrors.ctan.org/language/hyphen ... -07-01.pat
for the new and
http://mirrors.ctan.org/language/hyphen ... -07-01.pat
for the old German spelling and hyphenation rules.
A wordlist for this is available at
http://repo.or.cz/w/wortliste.git/tree/ (beware, "wortliste" is big, it killed my Safari!).

This actually seems to be the root for most open access German hyphenation, I suppose that the "CSS3 auto-hyphenation" included in Lion is based on the same data.

Until there is some real support for localised hyphenation, one can replace the contents of the Apple file
/System/Library/Frameworks/AppKit.framework/Versions/C/Resources/English-Hyphenation.txt
with the contents of
http://mirrors.ctan.org/language/hyphen ... -07-01.pat
(after stripping off all the TeX related code) and will obtain a much better hyphenation result.
To do this, one would need administrative privileges since this is deep inside the System folder, so it's not for the faint-hearted. But if you are working on a book and you need German hyphenation, this might be the way to go.
(Obviously you should back up all files involved before you mess around with them!)

In Lion, the problem should be solved: "Lion (Mac OS X 10.7) The patterns are located in /System/Library/LinguisticData/. There are patterns (binaries) for de, en_GB, en_US, es, fr, it, nl and ru." (http://code.google.com/p/hyphenator/wik ... yphenation)

All the best
Thomas
Larsemann
Posts: 2
Joined: 2012-01-02 10:49:39

Re: German Hyphenation / Nisus Documents on Server

Post by Larsemann »

Hi Thomas,

thanks for the valuable information. I have Lion but found out that the German hyphenation is still a big mess. In the language folder it has a binary file "hyphenation.dat". Do you know how to change this file? The TeX files are all text files and look totally different.

Hope you have a briliant idea about this as well :-)

Snowy greeting,

Lars
Anne Cuneo
Posts: 164
Joined: 2004-09-23 02:15:46
Location: Switzerland
Contact:

Re: German Hyphenation / Nisus Documents on Server

Post by Anne Cuneo »

I hadn't looked at this conversation for a while.
I find ThomasF solutions quite interesting, but I'm afraid to tamper with such deep hidden files, I must say.
In the meantime, I have resorted to the simple way: I have hyphenation unchecked, and if I have to give an article or any kind of text, I just leave it as it is. It is going to be set anyway.
And if it is a text I am sending myself, I go through it and hyphenate from hand the couple of places where the lines do not look good (esthetically speaking) if not hyphenated. Someone said this is time consuming. Well, it did take all of 10 minutes for 47 pages…
This being said, I'd love a solution for French.
Cheers.
Anne
ThomasF
Posts: 5
Joined: 2012-01-28 01:16:34

Re: German Hyphenation / Nisus Documents on Server

Post by ThomasF »

It wouldn't be too hard to create an AppleScript-Applet that lets you choose the language for hyphenation (globally), I'd be willing to create one if it is needed for users of Snow Leopard and earlier Mac OS X version. You would need to give administrative credentials every time you switch, though.
As for the situation with Lion, I don't know if Nisus Writer isn't working well with the new multilingual setting for hyphenation or if the hyphenation system itself isn't up to par. How is the hyphenation in TextEdit if you enter German text?
wawe26
Posts: 13
Joined: 2011-10-13 13:04:49

Re: German Hyphenation

Post by wawe26 »

Hi
The solution of ThomasF was perfect for us: I gave the name of the relevant Apple-file to the new hyphenation-file (the old one I renamed and put it beside, to use it again in case of troubles). But there haven't been any troubles. I just had to enter the administrator code.

Since then, the (german) hyphenation is really very good. It does even know the new German rules and we can trust, that the hyphenation is correct (what is important if you have to write text to official persons and clients). So we are very happy and I would like to thank Thomas for his help. An Apple-script however would be perfect.

Peter
User avatar
axolotl
Posts: 16
Joined: 2011-12-23 08:02:54
Location: Europe
Contact:

Re: German Hyphenation / Nisus Documents on Server

Post by axolotl »

I'm still evaluating Nisus and I can confirm that ThomasF's solution works. Thanks for the hint. I work also with TeX (ConTeXt) and consider the TeX hyphenation patterns to be really good (Indesign isn't bad either). Wise decision from Apple to rely on these patterns, pity that they include only the English one (Lion's .dat files in /System/Library/LinguisticData/ don't work for me).

However the drawback of this hack is that I have to rename the pattern files each time I have to deal with English texts. Apparently it will also be a problem to add exceptions.

It's a shame and a lack of basic functionality that Nisus Writer doesn't include a proper hyphenation system and relies on OS X instead. Nisus is a really well made and clever word processor but a non-working / non-present hyphenation system is an absolute show stopper for a word processor, specially – but not only – for languages that make heavy use of compound words. Try to set a multi-column text without hyphenation: impossible.

What makes the case even less funny (or more funny) is the fact that Nisus praise their word processor as "multilingual". For the moment this should read "a multilingual word processor [footnote:] We recommend to use Nisus only for English texts; other languages are not fully supported."

This may sound harsh but it isn't, because the lack of hyphenation isn't the only thing that qualifies Nisus as a rather monolingual word processor (labeling of cross references, http://j.mp/P1COwh)

Tom
ThomasF
Posts: 5
Joined: 2012-01-28 01:16:34

Re: German Hyphenation / Nisus Documents on Server

Post by ThomasF »

Hello,

I attach a small AppleScript "Hyphenation.scpt" which can help you manage your hyphenation files. You can extend this to your exception files if you find it useful, for my purposes it seems that one exception file for all the languages I use suffices. Note that you will have to identify as an administrator to change the hyphenation language.
You will have to add the languages you need to the selection (theLanguages etc.) in the script.
Another small script "New Exceptions.scpt" allows to add the manual (i.e. -based) hyphenations in the selection of window 1 of Nisus Writer Pro to the (one and only) hyphenation exceptions file.
Note that you might have to identify as an administrator to change either setting.
You can add these script to the Nisus Macro menu to have them readily available if you want to.
There is no warranty whatsoever with these scripts, and if you change them you might screw up your system with them, so be warned. The way they are now they could only confuse your hyphenation system.
To use them, you will need to have the appropriate hyphenation files ready (see my earlier message) before you activate the script.
Note that they are both sent as pure text, this system will not accept scripts as attachment, you will have to compile them yourself.

Best
Thomas
Attachments
Hyphenation.txt
Script to choose your hyphenation language
(3.66 KiB) Downloaded 515 times
New Exceptions.txt
Script to add hyphenation exceptions
(679 Bytes) Downloaded 504 times
User avatar
axolotl
Posts: 16
Joined: 2011-12-23 08:02:54
Location: Europe
Contact:

Re: German Hyphenation / Nisus Documents on Server

Post by axolotl »

Thank you. I will give it a try, until my Nisus trial expires. Maybe I will buy a license once they release a multilingual version that works out of the box.
Obviously I'm kinda pissed off by their false "multilingual" marketing :(

EDITED: Your script is very nice and works well. Didn't try the exceptions yet.
However Nisus needs to be relaunched each time to learn the new rules. (That was to be expected the way it works.)
Of course, this means also: 1 language per document :? We are in the 21st century, aren't we?

Am I expecting too much from a modern word processor? Don't think so. Well, I stop complaining, there are other solutions that work since many years/decades (TeX, LibreOffice, Mellel, ahem MS-Word, any current layout program, …)

Anyways, thanks for the script. While it was a short trip with Nisus, I learned that it has a helpful community :)

best wishes
Thomas (also)
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: German Hyphenation / Nisus Documents on Server

Post by martin »

We've just made available Nisus Writer Pro 2.0.3, which now includes hyphenation dictionaries for Danish, French, German, Italian, Polish, Portuguese, Spanish, and more languages. If you mark your text using NWP's language formatting, the appropriate hyphenation dictionary will be used automatically.
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: German Hyphenation / Nisus Documents on Server

Post by martin »

I should add: here's a full list of languages the new version hyphenates automatically. That FAQ entry also explains how to install additional TeX hyphenation dictionaries.
User avatar
axolotl
Posts: 16
Joined: 2011-12-23 08:02:54
Location: Europe
Contact:

Re: German Hyphenation / Nisus Documents on Server

Post by axolotl »

Thanks for the info, that sounds good.

However while reading the release notes I didn't find a mention of the cross reference language bug (http://j.mp/P1COwh). So I guess that one is still on the todo list?
User avatar
martin
Official Nisus Person
Posts: 5227
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: German Hyphenation / Nisus Documents on Server

Post by martin »

axolotl wrote:However while reading the release notes I didn't find a mention of the cross reference language bug (http://j.mp/P1COwh). So I guess that one is still on the todo list?
That's exactly right, that enhancement is still filed as something to add.
Post Reply