https://bugs.documentfoundation.org/show_bug.cgi?id=174308
Bug ID: 174308
Summary: Serbian Latin hyphenation breaks before final lj/nj
(ko-nj, pri-ja-te-lj) and beside nj/dž that are two
letters (ko-nju-ga-ci-ja)
Product: LibreOffice
Version: 26.8.2.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Linguistic
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Description:
`sr/hyph_sr-Latn.dic` breaks Serbian Latin words in two wrong ways. The
attached file fixes both. The Cyrillic `hyph_sr.dic` doesn't have these
problems.
1. **A break before a final `nj` or `lj`:** `ko-nj`, `pa-nj`, `kra-lj`,
`pri-ja-te-lj`, `obi-te-lj`. This affects 701 of the 185,498 stems I tested.
2. **Words where `nj` or `dž` is two letters:** `ko-nju-ga-ci-ja` should be
`kon-ju-ga-ci-ja`, `ko-njunk-ci-ja` should be `kon-junk-ci-ja`, `va-nje-zič-ki`
should be `van-je-zič-ki`, and `po-džanr` should be `pod-žanr`. *Pravopis
srpskoga jezika* (Matica srpska, 2002), §186, names `in-jekcija`,
`kon-jugacija` and `nad-živeti` as exceptions to the rule against splitting
these pairs.
**Steps to reproduce**
1. Type a narrow paragraph containing `konj` and `konjugacija`, with the text
language set to Serbian Latin.
2. Turn on automatic hyphenation.
3. Check where the words break at the end of a line, or use Tools › Language ›
Hyphenation.
**Cause and fix**
The README says these patterns derive from Dejan Muhamedagić's TeX patterns,
version 2.02, and the same problems are in the source file. I've proposed the
fix there: https://github.com/hyphenation/tex-hyphen/issues/74.
The fix is 37 raw patterns: 35 roots such as `ko8n9jug` and `.na8d9živ`, plus
`2nj.` and `2lj.`. The attached file is the current `hyph_sr-Latn.dic` with
those added and regenerated with `substrings.pl`. That matters, because
appending them raw makes unrelated words lose their breaks (`ab-di-ko-va-ti`
becomes `ab-di-kova-ti`). The file keeps its ISO8859-2 encoding and grows from
3,412 to 3,485 lines.
**Testing**
With libhyphen, against the stems of `sr/sr.dic`:
- Exactly 758 stems change: the 701 final pairs and 57 two-letter words. No
other word changes.
- `nadživeti`, `injekcija`, `konjunkcija`, `konjugacija`, `vanjezički`,
`panjugoslovenski` and `podžanr` all break correctly now, where only 2 of them
did before.
- Similar words with a real digraph don't change, such as `kanjon`, `tanjur`,
`budžet` and `odžak`.
The stems were base forms, and inflected forms were checked by hand on only a
few words. The dictionary also lists 11 stems such as коњугација with њ. I read
those as the same word as конјугација, so they break as `kon-ju-`.
The attached change is offered under the file's licence, LGPL 2.1 or later.
ONLYOFFICE ships the same patterns (ONLYOFFICE/DesktopEditors#2533), so it
would benefit as well. The same additions, in raw form, are in a published
Serbian dictionary set: https://github.com/sociolog/serbian-dictionaries
Steps to Reproduce:
1. Type a narrow paragraph containing `konj` and `konjugacija`, with the text
language set to Serbian Latin.
2. Turn on automatic hyphenation.
3. Check where the words break at the end of a line, or use Tools › Language ›
Hyphenation.
Actual Results:
konj → ko-nj, prijatelj → pri-ja-te-lj, konjugacija → ko-nju-ga-ci-ja, podžanr
→ po-džanr
Expected Results:
konj (no break), prijatelj → pri-ja-telj, konjugacija → kon-ju-ga-ci-ja,
podžanr → pod-žanr
Reproducible: Always
User Profile Reset: No
Additional Info:
Tested with libhyphen on the current sr/hyph_sr-Latn.dic, not in a LibreOffice
build. Related: tdf#138371 (Serbian dictionary files).
--
You are receiving this mail because:
You are the assignee for the bug.