Repository navigation
lingrep 0.8.2
lingrep 0.8.2
lingrep 0.8.2 fixes writing prepared corpora on WSL-mounted Windows drives
and FAT32 drives on macOS, improves diagnostics for Japanese text and patterns,
and adds commands to list and remove superseded prepared corpora.
curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fsSLO https://github.com/borh/lingrep/releases/download/v0.8.2/install.sh
sh install.shFixes
Windows drives through WSL, and USB drives
ling corpus build --output /mnt/c/...failed in 0.8.1 with
"Permission denied (os error 13)", although the 0.8.1 release notes said
that corpora could be written there. Building a corpus, writing a count
table,ling serveandling matches --ending-reportnow work on/mnt/c.- On macOS 15,
ling corpus buildto a FAT32 drive failed with
invalid provenance.sqlite format. It now succeeds. ling matches --ending-reporton an exFAT or FAT drive on macOS lost the
report after the whole scan. The report is now written.- I/O diagnostics during publication and provenance writes identify the path
and operation, such as "cannot rename '…' to '…'".
These cases now run in CI on FAT, exFAT, NTFS, case-insensitive ext4 and
APFS drives, and on C: from WSL 2.
Text from Japanese Windows and macOS
-
Corpus readers now skip a leading UTF-8 byte-order mark, which some
Notepad and Excel export options add. In 0.8.1 it became part of
the first word of a plain-text, Markdown or Soranoha document, and a JSONL
or CoNLL-U file that started with one could not be read. -
Invalid UTF-8 diagnostics identify the file, line and byte offset. When the
invalid bytes suggest Shift_JIS (CP932), the diagnostic includes a conversion
command:iconv -f CP932 -t UTF-8 old.txt > new.txtThe same applies to
.lxcatalogs. A.zipfile given as plain text fails
with a message to unzip it, or to read a Soranoha archive with
--input-format soranoha. -
When a pattern has a syntax error at a full-width character typed with
the Japanese IME, such as[,=or a full-width space, the error says
which ASCII character to type instead. lingrep-web's editor and question
page show the same note in Japanese. -
A value written in Japanese or typographic quotes, such as
[text=「猫」]
or[text=”猫”], is an error. In 0.8.1 the catalog compiled and the
pattern found nothing. -
Text copied from a PDF can spell
ガasカfollowed by a separate voiced
mark. A pattern value spelled that way now matches the corpus, with the
warningliteral_normalized. In 0.8.1 it found nothing. -
Source names use Unicode NFC. For plain text, Markdown and JSONL, otherwise
identical inputs with canonically equivalent names produce the same source
identity. If two source names normalize to the same name,lingreports both
original names and stops.
New: finding and deleting replaced corpora
Each time a dictionary, analyzer or ling's reader changes, ling corpus build writes a new prepared corpus beside the old one, and the old one
stays on disk. Two commands manage them:
ling corpus disk corpora/ # size and status of each corpus and count table
ling corpus prune corpora/ # lists what would be deleted
ling corpus prune corpora/ --execute # deletes the listed entriesBy default, prune selects earlier artifact formats for the current source
identity and same-source artifacts with a different analyzer or token schema.
It also selects count tables bound exclusively to artifacts selected for
removal. If you built the corpus with
-d, --input-format or --analyzer-config, give prune the same options,
so that it treats that build as the current one. It never deletes a folder
that holds a file ling did not write, and it deletes nothing for a source
that has no current corpus unless --keep names one. See
Pruning superseded artifacts
in the CLI guide.
Upgrading
Corpora and count tables prepared with 0.8.1 work with 0.8.2 without
rebuilding, including their reading sidecars in ling serve.
ling 0.8.2 reads plain-text, Markdown and Soranoha sources with a new
reader revision, because it drops the byte-order mark. Running ling corpus build again on such a source therefore writes a new corpus beside the
0.8.1 one instead of reusing it. Once it is built, the 0.8.1 corpus is
listed by ling corpus prune as kept, with the reason reader_variant;
--include-all-superseded deletes it.
ling corpus render can still write a reading sidecar for a Markdown corpus
built by 0.8.1. Rebuild first if either of these changes prevents rendering:
- A leading byte-order mark changes the sentences read from a source file.
The error says that re-reading the file "does not reproduce the stored
sentences." - NFC normalization changes a source file or folder name used in the corpus
identity. The error reports the source identity mismatch.
This normalization change preserves catalog fingerprints for sources already
in NFC, so saved question links that use those fingerprints still resolve.
Adapter wheels use version 0.8.2. See the
changelog for the complete list of changes.