## Summary * Add swedish hyphenation using scripts/update_hypenation.sh * Add hyphenation test data using the Swedish translation of Andy Weir's Project Hail Mary --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**NO**_
28 lines
518 B
Bash
Executable File
28 lines
518 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
|
cd "$ROOT_DIR"
|
|
|
|
process() {
|
|
local lang="$1"
|
|
|
|
mkdir -p "build"
|
|
wget -O "build/$lang.bin" "https://github.com/typst/hypher/raw/refs/heads/main/tries/$lang.bin"
|
|
|
|
python scripts/generate_hyphenation_trie.py \
|
|
--input "build/$lang.bin" \
|
|
--output "lib/Epub/Epub/hyphenation/generated/hyph-${lang}.trie.h"
|
|
}
|
|
|
|
process en
|
|
process fr
|
|
process de
|
|
process es
|
|
process ru
|
|
process it
|
|
process uk
|
|
process pl
|
|
process sv
|