README_sr.txt 2.3 KB

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