vim

Fork of vim, an acceptable text editor
git clone git://git.laack.co/vim.git
Log | Files | Refs | README | LICENSE

README_sr.txt (2406B)


      1 The location of source files for Serbian spelling dictionary were downloaded
      2 from https://github.com/LibreOffice/dictionaries/tree/master/sr (Serbian
      3 Spelling and Hyphenation for LibreOffice).
      4 
      5 Here 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 
     27 This dictionary used to create Vim spl file is the result of merging the two
     28 LibreOffice dictionaries for cyrillic and latin script.
     29 
     30 The merge was accomplished by concatenating two .dic and .aff files (appending
     31 the latin to cyrillic).
     32 
     33 The first step was to fix both .aff files by adding a '.' at the end of every
     34 SFX and PFX directive and removing directives that are not supported by Vim
     35 (KEY, MIDWORD).
     36 
     37 Next, update the flags in latin .dic and .aff files so that the flag sequence
     38 continues monotonically after the last flag number in cyrillic .aff file. 
     39 
     40 A couple of words in cyrillic dict used a latin codepoints for 'a' and 'e',
     41 that was also corrected.
     42 
     43 You 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 
     57 
     58 Ivan Pešić
     59 28.06.2022.