blob: 6a3b10a0dcaa16773a99703a7726e0367e3cd89b [file] [log] [blame]
Bram Moolenaar8cc5b552022-06-23 13:04:20 +01001The location of source files for Serbian spelling dictionary were downloaded
Bram Moolenaareb490412022-06-28 13:44:46 +01002from https://github.com/LibreOffice/dictionaries/tree/master/sr (Serbian
3Spelling and Hyphenation for LibreOffice).
Bram Moolenaar8cc5b552022-06-23 13:04:20 +01004
5Here is the content of original README file from the repository:
6
7 "LibreOffice Spelling and Hyphenation
8 extension package for Serbian (Cyrillic and Latin)
9
10 This extension package includes the Hunspell dictionary and Hyphen
11 hyphenation patterns for the Serbian language adapted for usage in
12 LibreOffice.
13
14 Serbian spelling dictionary is developed by Milutin Smiljanic
15 <msmiljanic.gm@gmail.com> and is released under GNU LGPL version 3 or
16 later / MPL version 2 or later / GNU GPL version 3 or later, giving
17 you the choice of one of the three sets of free software licensing
18 terms.
19
20 Serbian hyphenation patterns are derived from the official TeX
21 patterns for Serbocroatian language (Cyrillic and Latin) created by
22 Dejan Muhamedagić, version 2.02 from 22 June 2008 adopted for usage
23 with Hyphen hyphenation library and released under GNU LGPL version
24 2.1 or later."
25
26
27This dictionary used to create Vim spl file is the result of merging the two
Bram Moolenaareb490412022-06-28 13:44:46 +010028LibreOffice dictionaries for cyrillic and latin script.
Bram Moolenaar8cc5b552022-06-23 13:04:20 +010029
Bram Moolenaareb490412022-06-28 13:44:46 +010030The merge was accomplished by concatenating two .dic and .aff files (appending
31the latin to cyrillic).
Bram Moolenaar8cc5b552022-06-23 13:04:20 +010032
Bram Moolenaareb490412022-06-28 13:44:46 +010033The first step was to fix both .aff files by adding a '.' at the end of every
34SFX and PFX directive and removing directives that are not supported by Vim
35(KEY, MIDWORD).
36
37Next, update the flags in latin .dic and .aff files so that the flag sequence
38continues monotonically after the last flag number in cyrillic .aff file.
39
40A couple of words in cyrillic dict used a latin codepoints for 'a' and 'e',
41that was also corrected.
Bram Moolenaar8cc5b552022-06-23 13:04:20 +010042
Bram Moolenaar0d878b92022-07-01 18:45:04 +010043You should be able to reproduce this with these steps:
44 * Save the existing sr.aff and sr.dic files, if you have them, they will be
45 overwritten.
46 * Create a subfolder "new".
47 * Put 4 files downloaded from LibreOffice dictionaries GitHub repository in
48 it: sr.aff, sr-Latn.aff, sr.dic and sr-Latn.dic
49 * Open Vim and cd into "new"
50 * Execute: :so ../convert.vim
51 * The resulting sr.aff and sr.dic are created in the parent spell folder
52 (here).
53 * Now one can generate spl file as usual using the merged dic and aff
54 files:
55 env LANG=sr_RS.UTF-8 vim -u NONE -e -c "set enc=utf-8" -c "mkspell! ../sr sr" -c q
56
Bram Moolenaar8cc5b552022-06-23 13:04:20 +010057
58Ivan Pešić
Bram Moolenaareb490412022-06-28 13:44:46 +01005928.06.2022.