mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-26 03:17:28 -06:00
* M15: Polish interface, and Polish spelling, grammar and hyphenation
Interface
- Polish is the tenth interface language ("Polski", pl.tsv, 1,045 entries);
pl, pl-PL and pl_PL.UTF-8 system locales select it automatically.
- Right-click menu labels now go through translation in every language.
- Review > Language is a menu (English US/UK, Polski, Do not check spelling
or grammar); the status bar shows the language at the caret.
- With a Polish interface, new blank documents and opened .txt/.md files
default to pl-PL.
Proofing
- Each run is checked in its own language (w:lang, resolved through
styles): squiggles, F7, review.issues, suggestions and hyphenation.
Text in languages without proofing tools is no longer flagged as English.
- Polish spelling from the SJP.PL Hunspell dictionary (Apache-2.0 option),
read by a new Rust affix engine (crates/proof/src/affix.rs); 875 KB asset,
~4.5M word forms. Regenerate with the pl_dictionary example.
- Polish suggestions: case, missing diacritics, rz/ż, ó/u, ch/h confusions,
missing spaces (napewno -> na pewno), edit distance.
- Conservative Polish grammar rules: repeated words, spacing, doubled
punctuation, sentence capitals, missing comma before że/który/ponieważ/
aby/żeby/jeśli…, we/ze forms.
- Polish hyphenation with the hyph-utf8 hyph-pl.tex patterns (MIT option);
pattern keys widened to 20 letters, TeX exceptions parsed; the heuristic
no longer treats ł, ż, ś… as vowels.
review.language validates and normalizes tags, can set noProof alone and
the document default; format.state reports lang and noProof.
Tests for every part, docs and ATTRIBUTION.md/NOTICE updated;
cargo xtask ci passes (fmt, clippy, test, assets, layers, wasm).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Layout: rustfmt the test module order left unformatted by #391
cargo fmt --check failed on main after #391 added mod tests_grid.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Review fixes for #346: read Polish spelling from the installed Hunspell dictionary
- Polish spelling uses the Hunspell pl_PL dictionary installed on the
system (OS packages, Homebrew, LibreOffice, ~/.local/share/hunspell, or
WORDCRAFT_DICTIONARIES) instead of a bundled 870 KB SJP.PL file;
without one, Polish text gets no spelling marks, like Word without the
language's proofing tools. .aff/.dic are size-capped and decoded from
UTF-8 or ISO 8859-2 (crates/proof/src/hunspell.rs).
- The dictionary can be replaced at runtime (install_dictionary) or
re-searched (reload_dictionary); an empty one accepts every word.
- Tests use small synthetic dictionaries written for them, so they don't
depend on what the machine has installed.
- The bundled pl.dic, its ATTRIBUTION/NOTICE entries and the generator
example are removed; docs describe the installed dictionary.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* #100: affix — accept FLAG UTF-8 and DEFAULT flag modes
Per-character flag modes are what the reader already parses; only the
multi-character encodings (long, num) stay errors. VERO pt_BR declares
FLAG UTF-8.
* #100: affix — widen flag masks to u128 (128 flag capacity)
VERO pt_BR needs 106 distinct flags; the u64 bitmask capped at 64.
Serialization is unaffected: WCAFF1 stores flag characters and
re-derives the masks on load.
* #100: affix — support FORBIDDENWORD
VERO pt_BR marks spellings it must reject with a forbidden flag (ý).
Stems carrying it are listed but never correct and never inflect.
* #100: affix — continuation classes in check
SFX A 0 able/B: the form derived by A carries flag B, licensing a
further suffix of class B (workable -> workables) while the bare stem
cannot take one. form_has_flag walks the chain depth-bounded
(MAX_CHAIN = 3); with no continuations declared it degenerates to the
stem lookup, so existing dictionaries are unaffected. VERO pt_BR uses
26 continuation rules.
* #100: affix — continuation classes in forms
Enumerate chained suffix forms (workable -> workables) under the same
MAX_CHAIN bound the checker walks, so every form the checker accepts
is listed and vice versa.
* #100: affix — round-trip continuations and FORBIDDENWORD through WCAFF1
The compact format keeps its WCAFF1 magic: continuation classes ride
on the rule's appended field (as in the .aff source) and the forbidden
flag becomes a FORBIDDENWORD line. Old files read as before.
* #100: affix — strip a UTF-8 BOM from .aff/.dic input
VERO's files open with a BOM; glued to the count line it parsed as a
stem (one garbage entry per load) and to SET it hid the directive.
* #782: affix — the module doc still rejected what the code now reads
Continuation classes and FORBIDDENWORD are supported; the header said
Rejected for both.
* #100: pt — Portuguese spelling, following the Polish module
ProofLang::Pt resolves pt/pt-BR/pt-PT/por tags; the pt module reads the
installed Hunspell pt_BR dictionary (VERO) through the affix engine —
FLAG UTF-8 flags, continuation classes and FORBIDDENWORD spellings all
exercised by the synthetic test dictionary. Hyphenated compounds are
checked part by part (guarda-roupa, ex-marido); without a dictionary
installed, Portuguese text gets no marks. Spelling message in
Portuguese; suggestions and grammar land next.
* #100: pt — Portuguese suggestions
Rounds of rising cost, driven by the dictionary's own tables: missing
accents from MAP (coraçao -> coração, saude -> saúde), the REP
confusions (seje -> seja, excessão -> exceção), a missing space after a
short function word (nãoé -> não é, dagua -> da água), one typo over
TRY, and an accent-folding stem scan — the Polish rounds, retuned for
Portuguese.
* #100: pt — Portuguese grammar flags
Conservative rules with Portuguese messages: repeated words (except
the emphatic doubles Portuguese allows), space before punctuation and
double spaces, sentence capitals knowing the Portuguese abbreviations
and dialogue dashes, and doubled punctuation. No comma rule: que opens
a clause only sometimes, so a wrong flag would cost more than a missed
one.
* #100: pt — Portuguese hyphenation
hyph-utf8's hyph-pt.tex bundled unmodified (BSD 3-clause, ATTRIBUTION
row with source and hash): 426 Liang patterns and 2 exception words;
falls back to the generic heuristic outside their reach.
* #100: pt — Review › Language offers Português (Brasil), and a pt-br interface writes pt-BR
The menu's fourth entry sets the run language; the status bar names
Portuguese; editing_lang is now allowed for pt-br (wordcraft-proof
proofs it), so new documents under a Portuguese interface are
Portuguese by default.
* #100: pt — engine test: Portuguese proofing through the review commands
review.language pt-BR normalizes the tag, review.issues reports
Portuguese spelling and grammar with the lang field, F7 and Change
apply a suggestion, Add to Dictionary works for Portuguese.
* #100: pt — Portuguese in the mixed-language proofing tests and docs
check_text proofs a Portuguese span with the Portuguese message; the
never-panic loops and the module docs cover the third language.
* #100: docs — Portuguese proofing in the gap, parity and roadmap docs
Gap 8 narrowed (English, Polish and Portuguese), localization parity
gains a Portuguese row and a revision entry, target-app-parity's
Proofing row moves 40% -> 42%, and the ROADMAP progress log records
what landed.
* #100: hunspell — LibreOffice extension folders follow the language
The search paths hardcoded LibreOffice's dict-pl; a pt_BR user whose
only dictionary is LibreOffice's dict-pt-BR extension — on Windows the
only realistic on-disk source — got silently no spelling. Both the
primary-language folder and the dashed full name are now tried, so
Polish keeps dict-pl and Portuguese finds dict-pt-BR.
* #100: pt — review fixes
Suggestion ties break toward the change nearest the word's start
(saúde before saudê, proven against a fixture that has both); the
Language menu's label is the English source "Portuguese (Brazil)" with
translations in all twelve catalogs (as Polish is); the attribution
counts pt.pat's 2 exception words; the pt fixture drops a duplicate
stem; docs/roadmap.md catches up with the landing; the throwaway spike
is gone.
* Review fixes for #782: two-suffix chain limit, module doc
- MAX_CHAIN = 2 counts suffixes in a row, matching Hunspell's two-suffix limit
(the old bound of 3 allowed up to four); test pins that a third is rejected.
- Module doc: say probes allocate small scratch strings instead of claiming none.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Review fixes for #797: NOTICE for pt.pat, no indexing in the LibreOffice folder helper
- NOTICE reproduces hyph-pt.tex's BSD 3-Clause copyright notice, conditions and
disclaimer, which the licence requires for binary redistributions.
- hunspell::lo_ext_dirs builds its list without indexing (never-crash rule).
- Catalogs: main already translates "Portuguese (Brazil)" in every language, so the
duplicate rows the branch added are dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: witkowski01 <konradwitkowski01@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
504 lines
5.4 KiB
Plaintext
504 lines
5.4 KiB
Plaintext
% title: Hyphenation patterns for Portuguese
|
|
% copyright: Copyright (C) 1987, 1994, 1996, 2015 Pedro J. de Rezende, 1996, 2015 J. Joao Dias Almeida, 2024 Leonardo Araujo and Aline Benevides
|
|
% notice: This file is part of the hyph-utf8 package.
|
|
% See http://www.hyphenation.org/tex for more information.
|
|
% language:
|
|
% name: Portuguese
|
|
% tag: pt
|
|
% version: 1.4 2024-07-13
|
|
% authors:
|
|
% -
|
|
% name: Pedro J. de Rezende
|
|
% contact: rezende (at) ic.unicamp.br
|
|
% -
|
|
% name: J. Joao Dias Almeida
|
|
% contact: jj (at) di.uminho.pt
|
|
% -
|
|
% name: Leonardo Araujo
|
|
% contact: leolca (at) gmail.com
|
|
% -
|
|
% name: Aline Benevides
|
|
% contact: benevides.aline12 (at) gmail.com
|
|
% licence:
|
|
% name: BSD 3-clause licence
|
|
% url: https://opensource.org/licenses/BSD-3-Clause
|
|
% text: >
|
|
% Redistribution and use in source and binary forms, with or without
|
|
% modification, are permitted provided that the following conditions
|
|
% are met:
|
|
% * Redistributions of source code must retain the above copyright
|
|
% notice, this list of conditions and the following disclaimer.
|
|
% * Redistributions in binary form must reproduce the above copyright
|
|
% notice, this list of conditions and the following disclaimer in the
|
|
% documentation and/or other materials provided with the
|
|
% distribution.
|
|
% * Neither the name of the University of Campinas, of the University
|
|
% of Minho nor the names of its contributors may be used to endorse
|
|
% or promote products derived from this software without specific
|
|
% prior written permission.
|
|
%
|
|
% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
% "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
% A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PEDRO J. DE
|
|
% REZENDE OR J.JOAO DIAS ALMEIDA BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
% BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
|
% OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
|
% AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
|
|
% WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
% POSSIBILITY OF SUCH DAMAGE.
|
|
% hyphenmins:
|
|
% typesetting:
|
|
% left: 2
|
|
% right: 3
|
|
% changes:
|
|
% - Version 1.4 Release date: 13/07/2024 Leonardo Araujo and Aline Benevides
|
|
% - Version 1.3 Release date: 12/08/2015 Pedro J. de Rezende and J. Joao Dias Almeida
|
|
% - Version 1.2 Release date: 07/21/1996 Pedro J. de Rezende and J. Joao Dias Almeida
|
|
% - Version 1.1 Release date: 04/12/1994 Pedro J. de Rezende
|
|
% - Version 1.0 Release date: 02/13/1987 Pedro J. de Rezende
|
|
% texlive:
|
|
% synonyms:
|
|
% - portuges
|
|
% encoding: ec
|
|
% babelname: portuguese
|
|
% legacy_patterns: pthyph.tex
|
|
% message: Portuguese hyphenation patterns
|
|
% description: Hyphenation patterns for Portuguese in T1/EC and UTF-8 encodings.
|
|
%
|
|
\patterns{
|
|
1b2l
|
|
1b2r
|
|
1ba
|
|
1be
|
|
1bi
|
|
1bo
|
|
1bu
|
|
1bá
|
|
1bâ
|
|
1bã
|
|
1bé
|
|
1bí
|
|
1bó
|
|
1bú
|
|
1bê
|
|
1bõ
|
|
1c2h
|
|
1c2l
|
|
1c2r
|
|
1ca
|
|
1ce
|
|
1ci
|
|
1co
|
|
1cu
|
|
1cá
|
|
1câ
|
|
1cã
|
|
1cé
|
|
1cí
|
|
1có
|
|
1cú
|
|
1cê
|
|
1cõ
|
|
1ça
|
|
1çe
|
|
1çi
|
|
1ço
|
|
1çu
|
|
1çá
|
|
1çâ
|
|
1çã
|
|
1çé
|
|
1çí
|
|
1çó
|
|
1çú
|
|
1çê
|
|
1çõ
|
|
1d2l
|
|
1d2r
|
|
1da
|
|
1de
|
|
1di
|
|
1do
|
|
1du
|
|
1dá
|
|
1dâ
|
|
1dã
|
|
1dé
|
|
1dí
|
|
1dó
|
|
1dú
|
|
1dê
|
|
1dõ
|
|
1f2l
|
|
1f2r
|
|
1fa
|
|
1fe
|
|
1fi
|
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4li
|
|
a1ir.
|
|
u1ir.
|
|
1qu
|
|
1vô
|
|
1lô
|
|
1cô
|
|
1gô
|
|
1bô
|
|
1tô
|
|
1rô
|
|
1pô
|
|
a1é
|
|
a1í
|
|
a1ó
|
|
a1ú
|
|
e1á
|
|
e1â
|
|
e1ã
|
|
e1é
|
|
e1ê
|
|
e1í
|
|
e1ó
|
|
é1o
|
|
e1ú
|
|
i1á
|
|
i1ã
|
|
í1a
|
|
i1é
|
|
i1í
|
|
i1ó
|
|
í1o
|
|
i1u
|
|
i1ú
|
|
o1á
|
|
o1é
|
|
o1í
|
|
o1ó
|
|
u1á
|
|
u1ã
|
|
u1â
|
|
u1í
|
|
ú1o
|
|
1qu2á
|
|
1qu2â
|
|
1qu2í
|
|
1gu2í
|
|
a1ind
|
|
a1i1nh
|
|
e1imp
|
|
e1inc
|
|
e1inf
|
|
e1ing
|
|
e1ins
|
|
e1int
|
|
e1inv
|
|
u1iz.
|
|
a1iz.
|
|
4a.
|
|
4e.
|
|
4o.
|
|
1gu2á
|
|
1gu2ã
|
|
1qu2ã
|
|
.m2n
|
|
c2za
|
|
.s2
|
|
1p2seu1d
|
|
1dô
|
|
1fô
|
|
1mô
|
|
1nô
|
|
1sô
|
|
1zô
|
|
tu1i
|
|
tu2it
|
|
tu2id
|
|
bu1i
|
|
nu1i
|
|
o1in
|
|
u1in
|
|
su1i
|
|
í1e
|
|
ju1i
|
|
fu1i
|
|
du1i
|
|
do1im
|
|
au1i
|
|
u1i1ç
|
|
u1ê
|
|
1gu2ê
|
|
1qu2ê
|
|
1çô
|
|
u1é
|
|
1gu2é
|
|
1qu2é
|
|
1xô
|
|
a1â
|
|
a1ã
|
|
a1ô
|
|
e1ô
|
|
.ne4o
|
|
o1ã
|
|
o1ê
|
|
o1im
|
|
o2i1na
|
|
pro1i1b
|
|
co2ima
|
|
.t2
|
|
1-
|
|
}
|
|
\hyphenation{% Do NOT make any alterations to this list! --- PdR
|
|
hard-ware
|
|
soft-ware
|
|
}
|