Repository navigation
Releases
lingrep 0.10.0
lingrep 0.10.0
Patterns in lingrep 0.10.0 can match dependency paths and SUD deep features.
ling diff compares two match runs, ling tokenize exports CoNLL-U, and
ling check finds unsatisfiable definitions without a corpus. Rebuild count
tables: definitions that use &, measure, or same_as publish fewer nested
matches than in 0.9.
curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fsSLO https://github.com/borh/lingrep/releases/download/v0.10.0/install.sh
sh install.shInstall the Python bindings with python -m pip install lingrep==0.10.0.
Dependency paths, SUD deep features and span-layer trees
-[+ LABELS]->matches a path of basic dependency edges, and the first or
last edge can be tested separately.
Basic paths- Edge tests match SUD deep features such as
comp:aux@passon basic or
enhanced edges, anddeep(…)projects them.
SUD deep features tree(LAYER)measures dependency trees in a named span layer.
Occurrence measurements
Compare runs, export CoNLL-U and check catalogs
ling diffcompares saved match runs over the same corpus by span, named
role, or complete record, and writeslingrep.diff/v1JSONL.
Match comparison guideling tokenize --output-format conlluexports direct or prepared input as
CoNLL-U.
CoNLL-U export guideling --json summarize --by-window Ncounts occurrences per document-local
token window and writeslingrep.window-counts/v1.
Window counts guideling checkreports unsatisfiable token tests and definitions.
--containmentcompares which spans definitions can publish,
--verify-examplesexplains failed examples, and
--propose-counterexamples FILEfinds sentences that match after one
constraint is removed.
Catalog checks
Web interface
- The Workbench compares the edited pattern with the last search and opens
differing occurrences in the reader. - The Sample debugger verifies catalog examples and counterexamples, shows
which pattern element consumed each token, and can analyze edited text with
a configured GiNZA, spaCy, Stanza, protocol adapter, or Sudachi analyzer.
Live sample analyzer setup - The Question page groups hits by work, with work totals and source
positions, and sorts across all indexed hits. - The web pages have a dark theme, skip links, and Tab navigation between the
editor and adjacent controls. - The Japanese interface uses セクション for a document section, 一致箇所 for
a match, and 出現 for a counted occurrence.
GiNZA and spaCy transformer models on Apple Silicon
A spaCy or GiNZA transformer model runs on Apple Silicon with
backend = "mps". lingrep-spacy-setup selects it by default when the
environment's PyTorch reports MPS available. When MPS is unavailable, an
analyzer set up for mps fails at startup.
External analyzer setup
Upgrade from 0.9
- Rebuild count tables. The matcher revision is
lingrep-core-matcher/v3, and
lingrejects a table written by an earlier release. A definition that
uses&,measure, orsame_asdrops a span when another span from the
same definition starts earlier and ends later.
Match publication rules patterns/sf-experimental.lxcounts overlapping definitions. Pass
--overlaps longestto select one record per overlapping set.- Rebuild BCCWJ artifacts to restore leading zeros in genre codes.
- Set
--md-recover-conversion-artifactswhen you build a corpus.ling
rejects it with--corpus. - Rust callers of the corpus API read through
PreparedTokenReaderfor
random access andPreparedSentenceSourcefor sequential reads, and
MatchSinkimplementations declare an associated error type.
This release updates url to 2.5.9, which fixes RUSTSEC-2026-0592.
Adapter wheels use version 0.10.0. See the
changelog for the complete list of changes.
lingrep 0.9.1
lingrep 0.9.1
Tokenize Japanese from the command line with uvx lingrep tokenize '猫が眠る。'. For a batch, pipe one sentence per line and pass --workers 4. Each line of output is a JSON array of token surfaces, in input order.
On first use, the tokenizer downloads and verifies the default UniDic CWJ dictionary (about 1.3 GB on disk). It reuses the installed dictionary offline. To select your own, pass --dict-path or set LINGREP_DICTIONARY_PATH. The Python Tokenizer uses the same lookup. Corpus search from Python still requires the matching ling executable.
- Vibrato preserves the original character spans when NFC composes a letter and leaves a trailing combining mark. Rebuild prepared corpora to use the corrected alignment.
- French Stanza bundles can provide tokenization with just the GSD tokenizer and multi-word-token processor.
- Corpus builds that exhaust the process file limit report the I/O error and suggest raising the limit. Positional-window summaries can merge runs under a lower file limit.
lingrep 0.9.0
lingrep 0.9.0
lingrep 0.9.0 keeps the exact spelling of every token and matches patterns on
a folded spelling. Variant characters common in Japanese text, such as
half-width katakana, full-width letters, ideographic variation selectors and
the wave dash, no longer split words or hide matches, and results show the
text exactly as the source wrote it. Every prepared corpus and count table must
be rebuilt.
curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fsSLO https://github.com/borh/lingrep/releases/download/v0.9.0/install.sh
sh install.shPython and corpus queries
Install the bindings with python -m pip install lingrep==0.9.0. Run
ling dictionary install once to use the default Japanese dictionary.
Tokenizer(workers=4).pipe(sentences) tokenizes batches in input order.
Use from_spacy or from_stanza to match documents you have already analyzed.
Install lingrep[polars,arrow] for lazy Polars queries and Arrow token batches.
Patterns can follow annotated span dependencies, count dependents and bind
measurements within an occurrence. Saved questions and shared links can pin
the vector table used by a query.
surface and text
Each token now has two spellings:
surface(表層形) is the exact source text of the token. For CoNLL-U it is
the FORM column as written.text(照合形, match form) issurfacefolded for matching: variation
selectors removed, half-width katakana widened (ガラス → ガラス), the
full-width tilde ~ written as the wave dash 〜, Unicode NFC composition, and
full-width ASCII written as ASCII (NHK → NHK). The ideographic space
U+3000 is kept.
In 0.8, text was UniDic's orthography column for Vibrato and the analyzer's
own text for other analyzers, and no attribute kept the source spelling.
Every analyzer (Vibrato, Sudachi, GiNZA, and other spaCy or Stanza adapters)
now reads the folded text, and ling maps its words back to the source. Vibrato
and Sudachi keep a CJK compatibility ideograph where the dictionary lists a
word that contains it, such as 臭氣 written with U+FA5C.
Patterns
-
A
textvalue is folded before matching, so[text=ガラス]and
[text=ガラス]find the same tokens. This applies to=,!=,in,
not in,~,!~, inline and named sets, lexicon members read
by [text], and the values aneartest compares withtext. A value
that the fold changes is reported:warning[literal_folded]: q.lx:2:20: In definition `garasu_hw`, the `text` literal `ガラス` (U+FF76 U+FF9E U+FF97 U+FF7D) matches as its folded key `ガラス` (U+30AC U+30E9 U+30B9). Test `surface` to match the exact spelling -
[surface=…]matches the exact spelling and nothing else. Use it to find
one variant, such as[surface=ガラス]for the half-width spelling only. -
A regular expression on
textis used as written. If it contains a
character that the fold removes or replaces, it can never match that
character, andlingreportsregex_not_foldedwith the folded spelling. -
lemma,normand analyzer-specific attributes such asunidic.*are
compared as written. -
A corpus prepared by 0.8 has no
surfaceand an unfoldedtext. Querying
it withtextvalues reportstext_unfoldedand names the definitions
affected; rebuild the corpus.
ling check and the lingrep-web pattern editor, in English and Japanese,
report literal_folded and regex_not_folded as you write.
What changes in your results
These examples come from running ling 0.8.2 and 0.9.0 with the default
UniDic dictionary over these lines:
ガラスの靴を買った。
NHKの番組を見た。
葛󠄀城市に行く。 (葛 + U+E0100)
今日圖󠄃らずも會つた。 (圖 + U+E0103)
| Source | 0.8.2 | 0.9.0 |
|---|---|---|
| ガラス | one PROPN token ガラス, lemma ガラス; found only by [text=ガラス] |
NOUN, lemma ガラス-glas, text ガラス, surface ガラス; found by [text=ガラス] and [text=ガラス] |
| NHK | text NHK; found only by [text=NHK] |
text NHK, surface NHK; found by [text=NHK] and [text=NHK] |
| 葛 + U+E0100 城市 | 葛 / variation selector as a SYM token / 城市 | 葛城 (PROPN, lemma カツラギ) / 市; [text=葛城] matches, and the match shows 葛 + U+E0100 城 |
| 圖 + U+E0103 らずも | 圖 / variation selector as a SYM token / ら (AUX) / ず / も | 圖ら (VERB, lemma 図る) / ず / も; the result shows 圖 with its selector |
In 0.8.2 a match on 圖 reported the surface 圖 without the selector and a
char_span one character short. In 0.9.0 the surface and char_span cover
the selector.
Text without these characters gives the same results as before. Over the 373
Akutagawa Ryūnosuke documents of the Soranoha corpus, the 14 catalogs in
patterns/ that do not need dependency annotations produced the same match
records in 0.8.2 and 0.9.0, including spans, captures, char_span and the
matched text.
Other changes
--normalizationdefaults tononefor every analyzer, sosurfaceand
char_spanaddress the source text exactly.--normalization nfcstill
composes the source before analysis.- Highlights in the reading view of
ling serveand lingrep-web cover the
exact source characters of a match, including variation selectors,
half-width katakana and decomposed kana. In 0.8 such a match could
highlight the whole sentence or miss the word. - lingrep-web shows
surfacein KWIC lines, the inspector, frequency lines
and Excel exports, and labels the two attributes 表層形 and 照合形. A
frequency row grouped bytextis labelled with the match form; its lines
show each occurrence as written. - lingrep-web and the KWIC view of
ling exploreshow one space wherever
the source has whitespace between two tokens, as humanling matches
output does:I saw NHK news, where 0.8 showedIsawNHKnewsor, in the
workbench,N H Kfor a word the dictionary splits into letters. Text
without whitespace between tokens is shown as before. - Multi-token surfaces in JSONL, TSV and count tables preserve gaps between
tokens as one space. Rebuild earlier count tables with
ling summarize --write-tablefor the new keys. ling summarizefails witherror[missing_surface_offsets]when it groups
a multi-token surface in a sentence without character offsets, such as a
CoNLL-U sentence whose forms do not occur in its# textcomment. 0.8 counted
such a match under its tokens joined with nothing. Correct or delete the
# textline, or give the pattern akey:.lingloads Sudachi without its input-text plugins, sorewrite.defand
sudachi.jsondo not affect analysis; the folded text takes their place.
The 0.8 documentation said they were used.
Known limits
- GiNZA and Stanza receive the unified form of a compatibility ideograph, as
with NFC in 0.8, so GiNZA splits SudachiDict words such as 臭氣 with U+FA5C
into 臭 / 氣. - A displayed space stands for any whitespace between two tokens, so a tab or
a run of spaces is shown as one space.
Upgrading
Rebuild every prepared corpus and every count table. A corpus built by 0.8
still opens, but its text is unfolded and it has no surface, so a query
reports text_unfolded and its results differ from a rebuilt corpus. A count
table written by 0.8 fails with "built with a different matcher revision".
Rebuild with the same options as before:
ling corpus build --input-format soranoha corpora/works.zip
ling summarize --corpus corpora/works.zip.g3.a1.<identity>.locally-executed.lingcorpus \
--patterns catalog.lx --write-table corpora/works.lingtablecorpus build writes the new corpus beside the 0.8 one, under a new
identity. Then list and delete the 0.8 corpora and their count tables:
ling corpus disk corpora/ --input-format soranoha --current # 0.8 corpora are "superseded"
ling corpus prune corpora/ --input-format soranoha # lists what would be deleted
ling corpus prune corpora/ --input-format soranoha --execute # deletes themprune lists a 0.8 corpus of the same source as superseded, because it
differs in reader, analyzer and token schema, and deletes it without
--include-all-superseded. It also deletes a count table bound only to
corpora it deletes. Pass prune the -d, --input-format or
--analyzer-config options used for corpus build, as in 0.8.2. A
lingrep-web deployment needs the new corpus directory in its path and
count tables rebuilt over it.
Adapter wheels use version 0.9.0. See the
changelog for the complete list of changes.
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.
lingrep 0.8.1
lingrep 0.8.1
This release fixes problems found in classes using 0.8.0. Install it as before:
curl --proto '=https' --proto-redir '=https' --tlsv1.2 -fsSLO https://github.com/borh/lingrep/releases/latest/download/install.sh
sh install.shFixes
Writing tables and corpora
- On macOS,
ling summarize --write-tablecould fail with "too many open
files" on a large corpus.lingnow raises its own open-file limit and
sizes its temporary files to fit, soulimit -nis no longer needed. When
the limit is low,lingstill finishes and prints
warning[open_file_limit]. When even the smallest layout cannot fit,
lingstops before scanning and reports how many more open files it
requires. - In 0.8.1,
ling corpus buildunder/mnt/cstill fails with
"Permission denied (os error 13)". Use
0.8.2 or write the
corpus to a directory inside WSL, such as~/corpora. Correction: this
note first said that corpora could be written to/mnt/cin 0.8.1. ling analyzer prepareon a FAT or exFAT drive, such as many USB sticks,
failed during setup, after downloading, because the drive cannot hold
symbolic links. It now checks before downloading. If the check fails, it
reports an error that suggests an--outputdirectory on a drive that
supports them.ling corpus build --input-format plain DIRreads every.txtfile under
DIR, including subdirectories, as one document each. 0.8.0 rejected a
directory of.txtfiles. A directory without--input-formatis still
read as Markdown, and the error now suggests the flag when no Markdown
files are found.- A pattern that produced many matches in a few sentences could stop a run
although each sentence was within the output budget. Such batches are now
retried in smaller groups. A single sentence that still exceeds the budget
reports an error that suggests narrowing the pattern.
The question page and the Workbench
- With a catalog such as
class6.lx, the Workbench's "Derive compounds"
(複合項目を生成) could use all available memory. Compound derivation is
now off by default and stops at a fixed limit with a message that says to
turn it off or search fewer definitions. Links from the question page to
the analysis tools open the Workbench on the current pattern and corpus
with compounds off. - A completed search whose results were too large to display was reported as
failed. It is now shown as complete, and "Download all results as JSONL"
saves every match, including examples too large to preview. The link
appears only when the export can succeed, and it is still there after
reloading the page. - An example opened while a search was still running stays open when the
search finishes, and the search controls no longer move while results
arrive. - A saved question link records which catalog it was made with. If the
server's catalog has changed since, the page offers two choices: search
with the current catalog, or open the default question. - Result lists can be navigated with the arrow keys, Home and End, with a
single Tab stop for the list. - In Safari, Escape now closes an open example after you click one of its
tokens. Focus returns to the result line that opened it. - When the server rejects a Workbench download, the message is in Japanese
if the interface is in Japanese.
Serving prepared corpora
ling serve no longer requires a dictionary when every --corpus is a
prepared .lingcorpus artifact, so an instructor can hand out corpora and
count tables without the dictionary:
ling serve --corpus natsume=natsume.lingcorpus --count-table natsume.lingtable \
--patterns patterns/class6.lx --pattern-root patternsSource corpora and the Workbench's sample analysis still need a dictionary,
and their errors say how to supply one.
GiNZA transformer extras
Installing the spaCy adapter wheel with the electra or bert-large extra
failed in 0.8.0 because the extras' Transformers pin conflicted with
spacy-transformers. The extras now resolve to Transformers 4.53.2, the newest
version that spacy-transformers 1.4 accepts. To use Transformers 4.57.6, as the
adapter's own lock file does, put transformers==4.57.6 in overrides.txt
and add --override overrides.txt to uv pip install. ling analyzer prepare ginza installs the same locked versions as before.
Upgrading
Corpora and count tables prepared with 0.8.0 work with 0.8.1 without
rebuilding. This was checked with a Vibrato/UniDic corpus and a GiNZA corpus
built by the 0.8.0 release: ling corpus inspect --verify, ling matches,
ling summarize, ling summarize --write-table, ling table on a 0.8.0
count table, and ling serve (question page, Workbench and Frequencies) all
succeed, and ling matches returns the same records as 0.8.0. Reading a
prepared corpus does not run its analyzer.
Running ling corpus build again on the same source with the same
dictionary reuses the existing 0.8.0 Vibrato/UniDic artifact instead of
writing a new one.
GiNZA and Stanza analyzers
The identity of a GiNZA (spaCy) or Stanza analyzer now comes from the
adapter's semantics revision, the versions of the installed packages, and
the hashes of the model files. lingrep changes the semantics revision only
when the adapter's output changes. The identity no longer depends on the
bytes of lingrep's adapter code, so a later lingrep release that leaves the
analysis unchanged prepares an analyzer with the same identity. A change to any installed
package version, including a patch release, gives a new identity.
Under 0.8.1, a GiNZA analyzer therefore has a different identity from the
one 0.8.0 recorded, although it produces the same tokens. Nothing needs to
be prepared again:
- Corpora and count tables built with a 0.8.0 analyzer keep working, as
above. - A 0.8.0 analyzer still runs under 0.8.1 through
--analyzer-config. ling corpus buildof a source that 0.8.0 already built writes a second
artifact beside the 0.8.0 one, with an analyzer prepared by either
release, and prints a note naming "analyzer semantics" as the
difference. Later builds with the same analyzer reuse that artifact.
To prepare a 0.8.1 analyzer, choose a new directory; ling analyzer prepare
rejects one prepared by 0.8.0:
ling analyzer prepare ginza --output ./analyzers/ginza-0.8.1ling 0.8.0 cannot run an analyzer prepared by 0.8.1. ling now also
rejects a 0.8.1 analyzer whose adapter code has changed since it was
prepared; analyzers prepared by 0.8.0 are not checked.
Adapter wheels use version 0.8.1. See the
changelog for the complete list of
changes.
lingrep 0.8.0
lingrep 0.8.0
Set up GiNZA 5.3.1 from this release's adapter wheels:
ling analyzer prepare ginza --output ./analyzers/ginza-0.8.0The spaCy adapter installs GiNZA 5.3.1 with ja_ginza 5.3.0 and spaCy 3.8.18.
Its electra extra installs ja_ginza_electra 5.3.1, and a new bert-large
extra installs ja_ginza_bert_large 5.3.0. A GiNZA selection publishes
bunsetu (文節) segmentation as spacy.ginza.bunsetu, B on each
bunsetu-initial token and I on the others, equal to ginza -f conllu's
BunsetuBILabel:
pattern bunsetu_head := [spacy.ginza.bunsetu=B].
GiNZA's profiles now run the whole pipeline, so dependencies and UPOS equal
ginza -f conllu; the 0.7.0 profiles were tokenizer-only or ran the parser
without its tok2vec. Setup saves the transformer weights of
ja_ginza_electra and ja_ginza_bert_large in the analyzer, downloaded once
at a pinned Hugging Face Hub commit, and analysis runs with Hub access
disabled.
ling serve and lingrep-web open on a question page: a search with complete
concordances, metadata conditions, a token lab that draws the dependency arcs
between the words a match binds, with a 文節 view, document reading and JSONL
export. The Workbench is at /workbench. Frequencies lines open the matching
occurrence in the token lab.
Export the words a match rests on, including a verb that a where clause
binds outside the span:
ling matches --corpus works.lingcorpus --patterns patterns/npv-collocation.lx \
--json --evidenceexamples/compare_occurrences.py compares two such streams by role words and
writes one row per occurrence found by one pattern, the other, or both.
Other additions: matches --publish-attribute KEY and
--publish-all-attributes; table --by-document --json for sparse
per-document counts; summarize --grouping-coverage; --pattern-filter and
--group-patterns-by for summarize --by-section; overlap modes catalog,
keep and longest; --serve and --link on matches and summarize;
--vectors FILE for near tests and a Similar Words page; table --key FIELD=VALUE subsets; and --download-base/LING_DOWNLOAD_BASE mirrors for
adapter wheels and dictionaries.
Upgrading
- Prepared artifacts use generation 3 and provenance schema 5. Rebuild
generation 2 artifacts withling corpus build. - Set up existing spaCy and Stanza analyzers again into a new directory. The
changed GiNZA anden_core_web_smprofiles and the 0.8.0 adapter wheels
change analyzer identity, and corpora prepared with those analyzers have new
identities; rebuild them. Transformer analyzers set up by earlier releases
fetched their weights from the Hub at whatever commit it served each time
they started. - Rebuild Markdown artifacts and reading sidecars: the reader and renderer
identities advance with the display-math, table-boundary and alignment
fixes. - Word graph bindings publish
normwhen the token carries it, which changes
default output for corpora with bothnormand dependencies. ling serveandlingrep-webexit with status 1, not 2, when a corpus,
listener or runtime fails to start.- Rust API users: error variants change shape and
AnalysisErrorno longer
implementsCloneor equality. - Graph matching fails with a named resource error, such as
match_batch_too_large, when a sentence or matching batch exceeds its
budgets, instead of exhausting memory.
Web interface and analyzer fixes
- The question page chooses a definition from a menu. Definitions that only
count words, such aspos := []., link to Frequencies instead of listing
every token. Editing the source opens the pattern editor with highlighting,
completion and a live check that warns about attributes the selected corpus
does not carry. - Frequencies' "inspect tokens" opens a list of that entry's occurrences, and
the next and previous examples step through them. - Parts of speech and dependency relations are named in Japanese and English
in the token lab, Frequencies and the pattern editor, from one vocabulary
file. - A GiNZA analyzer prepared with 0.8.0 has the same identity on macOS and
Linux, so corpora built on either share it. - A search whose preview cannot be displayed no longer reports failure before
it finishes; its export is available as soon as the stream ends. - The example count stays as set after a search that found fewer lines.
Adapter wheels use version 0.8.0. See the
changelog for the complete release changes.
lingrep 0.7.0
lingrep 0.7.0
Run the browser interface from the CLI release archives:
ling serve --helpling serve takes the same arguments as lingrep-web. The default web
feature includes it; --no-default-features builds the CLI without it.
An occupied port produces an invocation error with exit code 2.
Build reusable frequency tables and browse them in the browser:
ling summarize --corpus works.lingcorpus --patterns patterns/collexeme.lx \
--write-table works.lingtable
ling serve --corpus works=works.lingcorpus --pattern-root patterns \
--count-table works.lingtableFrequencies shows counts, document metadata filters, entry profiles and
concordance lines. Compare ranks entries between two document scopes by G².
ling table and ling contrast provide the corresponding CLI results.
The workbench capture-key picker runs fresh CLI summaries for text, lemma
and norm projections without changing saved tables.
JSON consumers must replace complete.data.counters.tokens_matched with
complete.data.counters.tokens_scanned; there is no compatibility alias.
It counts tokens in scanned sentences, excluding sentences proven absent.
summarize --by-section and --by-metadata @document.KEY add section and
metadata-value counts to query/v2 output.
The query/v2 run record adds matcher_semantics_identity, and
ling --json check adds capture_key_edits to its lingrep.check/v1 record.
ling corpus render writes Markdown reading sidecars. Serve them with
ling serve --reading-sidecar PATH to read documents with their Markdown
headings and paragraphs. Selecting a line of a Frequencies entry opens its
occurrence in the document; closing the reader returns to the line. The URL
preserves the open reader, and corpora without a sidecar retain the
artifact-based reading view.
Markdown analysis excludes marked LaTeX math; conversion-artifact recovery
preserves significance asterisks before p-value comparisons. Rebuild existing
Markdown artifacts to apply these reader changes.
The Soranoha readers store @document.ndc as a list of NDC class codes, so
NDC 712 914 becomes ["712", "914"]. Rewrite @document.ndc = "NDC 913" as
@document.ndc contains "913". Soranoha artifacts built with 0.7.0 have new
analysis identities; rebuild an existing artifact to query ndc as a list.
Lookarounds can read neighbouring sentences within a document or an authored
division, such as a paragraph or section:
pattern next_noun := [] $ followed_by(^ [upos=NOUN], within=document).
A scoped body must have a maximum width and cannot contain another lookaround.
A window ends at a sentence removed by scope filtering, sampling, or an
oversized-sentence skip. Retained context counts toward the tokenized byte
limit, including empty sentences; execution fails if the required window
exceeds it. Anchor exclusion fragments cannot contain scoped lookarounds.
CLI scans, the browser, and explore support these windows.
A where clause accepts $a < $b < $c to constrain node order. Basic graph-node
binders select distinct words, including words distinct from surface captures
named by a basic edge. Queries that relied on repeated assignments can return
fewer matches.
Other additions include skip: tests, declared attribute label sets,
summarize --by-document, an artifact_path field in corpus build and inspect
JSON, and SVG diagram export to a directory. skip and labels are reserved
words. Direct runs preserve in-document ordinal gaps after scope filtering,
as prepared runs do. ling --json check --diagram rejects the incompatible
output modes.
Adapter wheels use version 0.7.0. Existing analyzer bundles remain usable;
preparing a bundle with the new wheels changes its analyzer identity and the
identities of corpora prepared with it. See the
changelog for the complete release changes.
lingrep 0.6.0
lingrep 0.6.0
Draw a pattern's recognition flow without a dictionary or corpus:
ling check --pattern '[upos=NOUN]? [upos=VERB]+.' --diagram
ling check --patterns constructions.lx --diagram --name target \
--expand --diagram-format svg >target.svgUnicode is the default; --diagram-format ascii changes the connectors.
--width sets layout columns. Wide expressions continue on connected rows or
use numbered subdiagrams with complete labels. SVG output requires one selected
definition and includes its own styles. Web diagrams follow the application theme,
distinguish intersection from unordered matching, and include every compound
dependency clause.
--progress auto, the default, shows no progress for streaming results, JSON,
TSV and redirected stdout. Deferred human output can show a status line after one
second on capable terminals. --progress always enables progress;
--trace-policy 0 prints policy totals, and a positive value also prints
per-record explanations. A query that creates a prepared artifact reports its path
once in every progress mode. Warnings remain visible, and a failed warning write
exits 1.
doctor --corpus checks a prepared corpus without loading the default dictionary.
Add --dict-path to check a dictionary too. Without --corpus, the default
dictionary is checked. Human output summarizes the selected checks; JSON warnings
use the diagnostic stream. A repeated dictionary check reuses the cached identity
and opens the dictionary to confirm that it is readable.
A schema block can declare map values, and an unknown type name is reported
by name. A metadata map key that is not an identifier, such as markdown-it-py,
fails compilation; 0.5.1 published it cut at the first such character.
ling coverage --where reports section labels the corpus cannot supply, as
matches and summarize do. With GiNZA, the spaCy adapter accepts text that
contains a comma.
The Harbor evaluation harness and its task images moved to the
lingrep-harbor repository.
Adapter wheels follow the 0.6.0 release version. Upgrading ling does not
require new analyzer bundles, and prepared corpora remain usable while their
format is supported. Preparing a new bundle with the 0.6.0 wheels changes its
analyzer identity and the identities of corpora prepared with it.
lingrep 0.5.1
lingrep 0.5.1
Prepare a GiNZA or Stanza CPU analyzer without a source checkout:
ling analyzer prepare ginza --output ./analyzers/ginza
ling matches --analyzer-config ./analyzers/ginza/analyzer.toml \
--patterns constructions.lx transcripts/Preparation requires uv on PATH. The output directory contains Python 3.14,
installed dependencies, the model and verified analyzer configuration. Clearing
Python download and package caches does not break the analyzer. Keep the output
at its original path; queries use the configuration without installing or
updating anything. Repeating the same preparation checks and reuses the directory.
Stanza preparation accepts an explicit language and processor/package selection.
Delete an analyzer's output directory to remove its runtime and model. Locate
shared downloads with uv cache dir and clear them with uv cache clean.
See the CLI guide
for both setup paths.
Releases include the protocol, spaCy and Stanza wheels in SHA256SUMS.
Wheel contents, license metadata and installed setup commands are checked before
tagging. Runtime dependencies use hash-pinned lock exports; the PyTorch index
is restricted to PyTorch packages. CPU setup selects native Torch builds on
macOS and Linux. Nix analyzer packages include readable license files for the
adapter and shared protocol.
Adapter package versions follow the CLI release. Preparing with later wheels
changes analyzer and prepared-corpus identities even when adapter code is
unchanged. Output directory names do not affect managed analyzer identity.
Upgrading ling alone leaves existing bundles unchanged; existing
prepared corpora remain usable while their format is supported.
lingrep 0.5.0
lingrep 0.5.0
This release adds TEI search, reusable external-analyzer setup, and corpus
inspection in the web interface. CLI help is shorter, long sentences use
singleton batches automatically, and tokenize --limit limits sentence output.
Upgrading from 0.4.0
Rebuild NFC prepared corpora whose manifests omit the normalization-table version
or record a version other than Unicode 18. The table version is part of reader
and analyzer identity, so those artifacts cannot be reused.
Markdown front matter also uses a revised parser that rejects duplicate keys;
rebuild Markdown corpora to use the revised reader.
Artifacts with a nonzero recorded truncation count are rejected for execution
and reuse. Rebuild those artifacts from source as well. Dictionary bytes and the
pinned Vibrato and Sudachi runtime engine revisions are unchanged.
Use matches or summarize with patterns/sentence-final.lx in place of the
removed sentence-final command. Rust callers should compile definitions through
FsmBuilder and use CompiledCatalog; raw-map compatibility APIs and public
mutable NFA construction have been removed.
TEI text and annotations
--input-format tei reads supported TEI P5 XML files or directories;
--input-format soranoha-tei reads Soranoha TEI archives. Soranoha TEI produces
the same principal text and sentence boundaries as its paired plaintext edition.
Inline readings and markup are available through tei.ruby, tei.element,
tei.rend and tei.source, including in prepared corpora. The
CLI guide describes the reading policy
and supported TEI subset.
Other changes
- Configure verified spaCy and Stanza analyzers once and reuse their sealed
bundles. The adapter wheels include setup tools; Nix packages an English
spaCy CPU model and analyzer configuration. - Scope web analysis by section, inspect compounds and overlapping matches,
compare sections, count documents, sort KWIC results, and read bounded
paragraph or document context. Exports and shared links preserve scope. - Use
--help-allfor advanced CLI controls. Terminal concordances preserve
source spacing, and progress appears automatically on terminal stderr. - Long sentences use singleton batches within the documented resource limits;
Sudachi chunks long input while preserving original sentence offsets. - Prepared-corpus builds collect postings while writing tokens, avoiding a
reconstruction pass without changing artifact bytes or identities. - Dependency-pattern exclusions and set-operand ordering are corrected.
Dependency updates address RustSec findings and remove unmaintained packages,
including vulnerable zstd dependencies in the runtime, fuzz and converter graphs. - Dictionary installations include upstream license and attribution files.
See the installation guide for archives, Nix and analyzer
setup, and the changelog for the full release summary.