Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - crash during odt auto saves.
crash during odt auto saves.
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
ElishaShemuel
Agent


Joined: Apr 24, 2009
Posts: 18

PostPosted: Wed Jul 08, 2009 11:53 am    Post subject: Custom Dictionary cut and paste into NeoOffice prefrences?

According to this thread; So if I put all my words on one line then what do I do with this code to make it all noticable by NeoOffice and then have it work? Want to set my own custom dictionary or edit a full custom dictionary existing one that may or may not be corrupt. Do I cut and past this script into my dictionary word text? Do I continue by starting with a text doc or neooffice odt or txt or what?


#/usr/bin/perl -w

use strict;

# This script 'split_to_dict'
# 1. Reads standard input or a list of files specified on the command line
# line by line in text mode, so it will automatically account for
# unicode double byte where it (and perl) can.
# 2. It splits the lines into strings based on whitespace or
# null (zero) characters
# 3. It removes all control characters from the strings and
# 4. Outputs the strings to STDOUT separated by zero (null) characters.
#
# Usage: perl split_to_dict inputfile1 inputfile2 > targetfile
#
# The inputfiles could be standard.dic OSX or Open Office dict or a list
# of words one per line or whitespace separated.
#
# The targetfile is suitable for pasting into ~/Library/Spelling/ dictionaries:
# cat targetfile >> ~/Library/Spelling/targetDictionary
#
# should do it where targetDictionary is "en" or "GB_en" or whatever.
# based on ideas from Cameron Hayne (macdev@hayne.net) June 2005
# version 1 Mark Kaehny March 2009
#
# released under the same license as the standard perl distribution:
# GPL version 2 or later (See the Free Software Foundation Websitei) or
# Artistic license version 2.
#

my $line;
my $word;

while ($line = <>) {
# split on whitespace or NULL (0 valued) character
foreach $word (split(/[\s\x00]/, $line)) {
next if $word =~ /WBSWG6/; # skip standard.dic header
# add manually if needed.
$word =~ s/[\cA-\cZ]//g; # junk all control chars (i.e. 1-26 ascii)
print $word, "\x00" if ($word); # add null & skip blank words
}
}
Back to top
James3359
The Merovingian


Joined: Jul 05, 2005
Posts: 685
Location: North West England

PostPosted: Thu Jul 09, 2009 2:30 am    Post subject:

As you have also posted your question about dictionaries on the Adding lists of terms to OSX spell-checker thread (which is a sensible place for this discussion, I am going to reply to you there.
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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 vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.