Repository navigation
feat(analysis): fix transcripts' grammar with a LanguageTool server - #521
Merged
Merged
Conversation
adeelahmad
force-pushed
the
claude/project-thread-hyaa6h
branch
8 times, most recently
from
October 18, 2026 07:59
576dfad to
3b83220
Compare
21 of 23 tasks
adeelahmad
force-pushed
the
claude/project-thread-hyaa6h
branch
from
October 18, 2026 08:35
3b83220 to
7587f43
Compare
Owner
Author
|
Clicks and keystrokes per feature failed on 7587f43: the phone journey reported "worse: chat-ask fails now" (on the previous head it was Generated by Claude Code |
With transcripts cleaned up and Settings > Analysis > LanguageTool server
set (none by default), the clean step sends a transcript's lines to that
server, a batch at a time, and makes its grammar and punctuation fixes ("he
go" > "he goes", "a apple" > "an apple"). Spelling, style and wording
suggestions are left out, and so is any fix to a word with a capital, so
names stay as said. Offsets are read in UTF-16 units, as LanguageTool counts
them. No redirect is followed, each call is an activity ledger row, and when
the server doesn't answer the rules' changes stand and the job log says so.
The compose files gain an opt-in `languagetool` profile
(erikvl87/languagetool 6.8, on Lens's network only). language_tool_python,
which the pasted script used, is GPL-3.0 and starts Java itself, so Lens
talks to a server instead.
Docs, changelog, dev log and threat model updated.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014z3r72SB2quWGKbgGt46mZ
adeelahmad
force-pushed
the
claude/project-thread-hyaa6h
branch
from
October 18, 2026 11:06
7587f43 to
8a83fe7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: the clean step fixed stutters and spacing but not grammar; the pasted script's LanguageTool pass ("he go" → "he goes") had no place in Lens.
After: with transcripts cleaned up and Settings → Analysis → LanguageTool server set (none by default), the clean step sends a transcript's lines to that server and makes its grammar, punctuation and typography fixes and "a"/"an" ("he go" → "he goes", "a apple" → "an apple"). Spelling, style, wording and repeated-word suggestions are left out, and so is any fix to a word with a capital, so names and how people talk stay as said. Each change is in Change history with Revert. When the server doesn't answer, the rules' changes stand and the job's log says so. The compose files gain an opt-in
languagetoolprofile (docker compose --profile languagetool up -d) that starts one athttp://languagetool:8010.How:
cleanup.grammarbatches lines (10,000 characters a call) toPOST /v2/check, maps LanguageTool's UTF-16 offsets back to each line, follows no redirect, caps the answer's size, and logs each call in the activity ledger. language_tool_python, which the script used, is GPL-3.0 and starts Java itself, so Lens talks to a server instead. Categories were checked against a real LanguageTool 6.8.Motivation and Context
Last of the series from Adeel's pasted punctuation and grammar script (#476 cleanup, #485 punctuation, #492 spaCy, #504 dates).
Types of changes
!in the title)Checklist:
make hookschecks it on commit).docs/accordingly.## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
PUT /api/v1/settings/analysis(cleanup_grammar_url) andchange_settings; changes in the edit history API.docs/requirements.mdrow added (make requirementspasses).tests/domain/test_cleanup.py(a fake server counting UTF-16 offsets, the categories taken and left, the server down, the address check);docs/processing.md,docs/requirements.md, README, CHANGELOG, DEVLOG updated; OpenAPI unchanged.Local CI (
ci/local-ci.sh): backend (embedded and server SurrealDB), Next.js, pre-commit, title and the upgrade check passed.Generated by Claude Code