Reply to topic  [ 4 posts ] 
Thesaurus - other languages than english 
Author Message

Joined: 2015-06-27 01:38:22
Posts: 10
I've recently installed the spelling and hyphenation Catalan dictionaries, which are good, constantly updated. It'd be nice to be able to do the same with the thesaurus files.

If this was possible, maybe the thesaurus files from the LibreOffice installation would work. I've found them in the installation package ("th_ca_ES_v3.dat" and "th_ca_ES_v3.idx"). In LO Writer, the thesaurus is invoked by the simple Cmd F7 shortcut.

Please, if anyone reads this, I would appreciate very much a hint as to this being possible or not.

Best wishes to everybody,

Pere


2015-09-02 01:17:13
Profile

Joined: 2014-02-08 12:57:03
Posts: 170
Location: Australia
G’day, Pere et al

You can copy those thesaurus files to a convenient location and then rename them. If permissions are a problem, you can copy their contents and paste them into a new Nisus document.

What follows is a simple macro that could be invoked with a keyboard shortcut. Alter folder paths and filenames in the macro as appropriate. The .txt file in the macro is derived from a (German) .dat file rather than a .idx file. I won’t bother to elaborate here on the syntax of the .dat files, but the macro could be adapted if desired to make entries a little easier on the eye. It could also be enhanced to allow you to select a particular synonym and have it replace the original word or expression in your main document. I have not bothered to incorporate error checking, but you should be aware that the macro only finds index words. It will find synonyms for “gut”, for example, but not for “guten”.

Code:
#NisusMacroProperty Name: Thesaurus

# This macro gets a selected word or expression in the active document and finds synonyms for it in the designated thesaurus file.

$thesaurus_folder = 'Documents/Thesaurus/'
$path_to_thesaurus_folder = '~/' & $thesaurus_folder
$German_thesaurus = 'Thesaurus DE.txt'
$current_thesaurus = $German_thesaurus
$path_to_current_thesaurus = $path_to_thesaurus_folder & $current_thesaurus

Copy
$keyword = Read Clipboard

Open $path_to_current_thesaurus
Find All @Text<^$keyword\|.+\n(-.+\n)+>, 'Ea'


I hope this indicates one path you may care to follow. Any further discussion of macros should really be conducted in the Macros forum, though.

Cheers,
Adrian

_________________
MacBook Pro (mid-2014)
macOS Sierra 10.12.6
Nisus Writer user since 1996


2015-09-03 02:48:09
Profile

Joined: 2014-02-08 12:57:03
Posts: 170
Location: Australia
G’day, Pere et al

I see there is a discussion on Writing in Multiple Languages in the Nisus Writer Pro User Guide. It specifically mentions LibreOffice dictionaries, but I haven’t yet experimented to see how easy it all is in operation. No doubt other multilinguists on the forum will have done so.

Cheers,
Adrian

_________________
MacBook Pro (mid-2014)
macOS Sierra 10.12.6
Nisus Writer user since 1996


2015-09-03 21:38:05
Profile

Joined: 2015-06-27 01:38:22
Posts: 10
Thanks a lot, Adryan. I will what you suggested.

Best wishes,

Pere


2015-10-01 07:08:42
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software