|
|
#436 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,625
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
A new preview build of calibre is available, and it adds a big new feature to the
ebook editor (Edit book): grammar checking and suggestions for rewriting sentences. Please try it out and report any problems you find, so they can be fixed before the next release. Note that it runs completely on your computer and does not use LLMs, it uses rules based grammar checkers and also seq2seq models. Grammar checking ------------------ As you edit HTML files, grammar, style and typography issues are underlined in the code view, just like spelling mistakes. Right click an underlined issue to: * Replace it with one of the suggested corrections * Ignore it for the current session * Stop checking for that kind of issue altogether * See an explanation of the issue Hovering the mouse over an issue describes it, and Shift+F8 jumps to the next issue in the current file. Corrections change only the text, so formatting such as bold and italics is preserved, and each correction can be undone in one step. To review the whole book at once, use Tools->Check grammar (Shift+F7). It lists every issue in the book along with explanations and suggested replacements. You can correct issues, jump to them in the editor, filter the list by text and type of issue, ignore issues, and disable (and later re-enable) rules you are not interested in. Turn on the "Picky" option to also flag stylistic issues that are not errors, such as wordiness. Grammar checking works for many languages. As with spell checking, the language comes from the book's metadata and from lang attributes in the HTML, so books containing text in several languages are checked correctly. Only paragraphs that have changed are checked again, and the checking runs in the background so it does not slow down editing. For English, there is also a "Deep check" option, which checks every sentence with a neural network as well. It finds errors that the rules miss, but it is slower. Once its neural network has been downloaded, it is also used to rank the suggested corrections for English text, putting the best ones first. Sentence rewrite suggestions ------------------------------ For English text, a neural network can suggest rewrites of sentences. You choose the kinds of suggestions you want: fixing grammar, making a sentence more fluent or clearer, simpler or more formal, or paraphrasing it. * Right click a sentence and choose "Suggest rewrites for the sentence" (Ctrl+Shift+F8) to see suggestions for it in a popup * Open the View->Rewrite suggestions panel, which follows the sentence your cursor is in as you move through the text * In the Check grammar tool, suggestions are shown for the sentence containing the selected issue Each suggestion shows the changes it makes to the sentence. Click "Apply" to rewrite the sentence. Its formatting is kept, and you can undo the rewrite in one step. Suggestions that would change text that must not change, such as code, are not shown, and neither are suggestions that would add new grammar issues. What you need to do to use them --------------------------------- Grammar checking and rewrite suggestions are turned on in the editor, but they need data that is not included with calibre. calibre asks before downloading anything. Once the data is downloaded, all checking and suggestions run entirely on your computer and no text is ever sent anywhere. 1. Language data for grammar checking: the data for each language is downloaded the first time it is needed. Right click in the editor and choose to download it, or download it from the Tools->Check grammar tool. Until it is downloaded, that language is not checked. 2. Neural network for Deep check (English only): downloaded when you first turn on Deep check in the Check grammar tool. It is about 150 MB. 3. Neural network for rewrite suggestions (English only): downloaded the first time you ask for suggestions. It is large, about 1.2 GB. Generating suggestions is much faster on a GPU. By default calibre uses the GPU if it is supported and turns out to be faster than the CPU. When the GPU might be used, versions of the neural network for both the CPU and the GPU are downloaded, so the download is considerably larger (around 4 GB in total for the rewrite suggestions). If you do not want this, set "Use the GPU for grammar neural networks" to "Never" in Preferences->Editor settings, and only the CPU version is downloaded. Underlining of grammar issues can be turned off in Preferences->Editor settings, and its color can be changed with the new GrammarError entry in the editor themes. Limitations ------------- * Sentence rewrite suggestions and the Deep check are English only. Grammar checking with the rules works for many other languages, but text in other languages gets neither rewrite suggestions nor neural network checks. * Grammar checking is done only in the ebook editor, in HTML files. * The neural network downloads are large, and generating suggestions on a CPU can be slow, especially on older computers. * Like any automated tool, grammar checks and rewrites are suggestions, not infallible. They can miss errors, flag correct text, or suggest rewrites that change the meaning of a sentence, particularly in fiction, dialogue and deliberately unconventional prose. Read every suggestion before applying it. |
|
|
|
|
|
#437 |
|
want to learn what I want
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,498
Karma: 9656907
Join Date: Sep 2020
Device: Libra Colour
|
Paraphrase option is cool idea. I use it all the time by asking Google AI Overview for quick alternatives, and I wish this forum had such a tool available in the advanced posting editor, lol.
![]() Last edited by Comfy.n; 11-13-2026 at 04:01 AM. |
|
|
|
|
|
#438 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,942
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I already have the LT toolset available in Sigil, LO Writer and MS Word via plugins. From an integration perspective this is by far the best of the bunch.
However, it has the same shortcoming as the Sigil plugin… it's 'hooked up' to the EPUB xhtml files and code view editing. From a copy editor/proofreader's perspective the file structure of the EPUB is largely irrelevant, as are the intricacies of markup associated with endnotes, indexing, inline formatting etc. I would prefer attention be drawn to an issue by 'highlighting' the relevant paragraph(s) within the Preview panel rather than the CodeView panel. Would that be feasible. BR Last edited by BetterRed; 11-14-2026 at 01:51 AM. |
|
|
|
|
|
#439 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,625
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, not really, even if I were to implement that, you wouldnt be able to edit the setences in the preview panel. Note that there is a dedicated grammar check tool you can use to browse issues just like the spelling check tool. You can access it via the Tools menu or shift+f7 or add it to the toolbar
|
|
|
|
|
|
#440 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,942
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
I've only tried using it via the Shift+F7 option, haven't tried the inline option… yet. I was not expecting to edit in Preview, something like the following was what I had in mind.
Some issues span multiple sentences - like the one in that screenshot. They need to be resolved as a set within the context of the paragraph/chapter/work as a whole. And what one might do in a novel, one wouldn't do in a cookery book, or a Germaine Greer biography. I'll download the neural net files tonight. BR |
|
|
|
|
|
#441 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,625
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Double clicking on a sentence in that tool moves the cursor to the sentence in the code view and the preview follows it, are you saying you want the sentence to be highlighted in the preview as well?
|
|
|
|
|
|
#442 | |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,942
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
BR |
|
|
|
|
|
|
#443 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,942
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Works better for me if: I merge the text files so that I'm editing the work as a whole, and use a theme that drops the markup related colouring.
Still like to have current paragraph highlight in Preview. BR |
|
|
|
|
|
#444 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,625
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
|
|
|
|
|
#445 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,942
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Will there be another preview release?
There seem to be LT features included in this implementation that are subscription only elsewhere - e.g. subject/verb alignment. I moved Jon's kepub issue to the Editor sub forum. BR |
|
|
|
|
|
#446 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,625
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Sure, I made another preview release. As for features, it's based on the open source rulesets from languagetool but it doesnt use languagetool itself, it uses a python/C port I made of it, so it isnt bound by whatever restrictions languagetool may have.
|
|
|
|
|
|
#447 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,942
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
The preview highlight is great, but it evaporates after a few seconds… I would prefer that it persists while the para has focus in the code window.
The Enter key on an item in the Check Grammar list, closes the list, IMO it should do what a double click does - jump to the relevant paragraph in codeview and preview. And I need a shortcut to give focus to the grammar error list. Ah-ha, that explains other differences that were puzzling me… like why don't the Word, Sigil, Google wrappers do it like this. |
|
|
|
|
|
#448 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,625
Karma: 29634066
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
the evaporation is deliberate there is too much risk of stale highlights persisting otherwise, it serves to draw the eye to the paragraph which is the main purpose. as for enter key, sure.
|
|
|
|
|
|
#449 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,784
Karma: 154365285
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is the editor going to be fixed before the next version so the KePub code does not get changed? I am running the beta.
|
|
|
|
|
|
#450 | |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,942
Karma: 34252880
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Perhaps it could be a preference… or a toggle. There needs to be a way to exclude files from the process, if the tool is run against an already published book the user would probably want to exclude front and back matter files. Why would anyone grammar check a published work… could be useful for people learning a language. BR |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Dockerise multiple Calibre releases for plugin development | wolf123 | Related Tools | 1 | 02-06-2021 04:12 AM |
| [Q] How can I check for new releases in a series in calibre or goodreads? | lambstone | Kobo Reader | 1 | 09-09-2016 01:04 AM |
| CC B4.0.X beta (all releases) | chaley | Calibre Companion | 41 | 07-21-2015 07:53 AM |
| CC beta releases 3.4.4j, 3.4.4k, 3.4.4l | chaley | Calibre Companion | 33 | 10-21-2014 07:19 AM |
| dotReader releases first public beta | Alexander Turcic | Reading and Management | 4 | 11-23-2006 02:40 AM |