Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 12-21-2015, 07:20 PM   #151
Steadyhands
Connoisseur
Steadyhands began at the beginning.
 
Steadyhands's Avatar
 
Posts: 56
Karma: 10
Join Date: Dec 2011
Device: Samsung Tablet
Quote:
Originally Posted by CalibUser View Post
Thanks, Steadyhands.

I will incorporate the code in the next version of the plugin.
Great
[ ]?‘(?i)(\d\d|ad|at|appen[a-z]*|ard|ave|bout|bye|cause|cept|cos|cuz|couse|ere|ea rd|em|er|e|ee|ell|f|fraid|fore|id|ighness|im|is|is self|gainst|kay|less|mongst|n|nd|neath|nough|nothe r|nuff|ood|ome|ow|ope|oney|orse[a-z]*|puter[a-z]*|round|scuse|spect[a-z]*|scaped|sides|tween|specially|t|taint|til|tis|twa s|twere|twould|twill|ud|un|urt)([\p{P}|\s])[/CODE]

Been playing a little more, I've added a couple of others and added [a-z]* to some to catch things like ‘orse ‘orses ‘orseflesh, ‘appen ‘appened, ‘57 ‘88.

Last edited by Steadyhands; 12-21-2015 at 08:20 PM.
Steadyhands is offline   Reply With Quote
Old 12-22-2015, 03:59 AM   #152
gipsy
Connoisseur
gipsy began at the beginning.
 
Posts: 81
Karma: 10
Join Date: Nov 2013
Device: Kobo Aura HD
Hi,
can someone help me refine the FixP, FixE, FixW, FixO, FixF for greek letters?
As there are now they made some unnecessary changes. I want the to search and make changes in a whole word (start, middle, end), now sometimes they make changes and if the word is in the dictionary and sometimes and in hyphen words.
I notice the unnecessary changes after i add a (\w*|\s) at the start and end if the
Code:
CorrectText("ώ fixes",r"(\w*|\s)(οί\)|νο'\)|α\)|οδ|οό|ιυ|άί|ο5|ο'\)|ιίι|\(ό|ο\)|ίό|ο&gt;|ο'ι|ιό|οί|ιο|οι|&lt;ο|οϊ)(\w*\s)(?![^<>]*>)(?!.*<body[^>]*>)", IsFixO)
in order to get changes in the start-middle-end of the word.

There is any other solution to get the CorrectText to search in the start-middle-end of the word?

Thanks

Last edited by gipsy; 12-22-2015 at 04:03 AM.
gipsy is offline   Reply With Quote
Advert
Old 12-22-2015, 10:57 AM   #153
CalibUser
Zealot
CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.
 
Posts: 143
Karma: 61844
Join Date: Jul 2015
Device: Sony
Plugin updated to version 2.0.0.5

The plugin has been updated in the first post in this thread as follows:
  • Plugin now checks for updates on the web and informs you if an update is available.
  • Plugin checks more words that are preceded by an apostrophe in the wrong direction eg ‘oney and the case of the word is ignored - with thanks to Steadyhands.
  • Some internal code has been simplified.

@Steadyhands:
Quote:
Originally Posted by Steadyhands View Post
[ ]?‘(?i)(\d\d|ad|at|appen[a-z]*|ard|ave|bout|bye|cause|cept|cos|cuz|couse|ere|ea rd|em|er|e|ee|ell|f|fraid|fore|id|ighness|im|is|is self|gainst|kay|less|mongst|n|nd|neath|nough|nothe r|nuff|ood|ome|ow|ope|oney|orse[a-z]*|puter[a-z]*|round|scuse|spect[a-z]*|scaped|sides|tween|specially|t|taint|til|tis|twa s|twere|twould|twill|ud|un|urt)([\p{P}|\s])
I have modified the end of your code slightly so that it can amend apostrophes that appear in front of words that are followed by punctuation marks, eg, commas and quote marks. For example, the code will now handle:

"We’ll be seeing ‘em, I said to ‘er"

I have replaced ([\p{P}|\s]) in your code with (\W?).
CalibUser is offline   Reply With Quote
Old 12-23-2015, 06:24 PM   #154
Steadyhands
Connoisseur
Steadyhands began at the beginning.
 
Steadyhands's Avatar
 
Posts: 56
Karma: 10
Join Date: Dec 2011
Device: Samsung Tablet
I've been working on the word list and the regex associated with them. The range [a-z]* gives too broad a match and will result in too many false positive returns. I've converted these to repetition matches in greedy mode. i.e. app[yines]{0,5} will match appy and appiness, and e[emr]{0,1} will match e, ee, em, er. Still not 100% perfect but much better then before. There are still issues with false positives for text like ‘At the sound of’ and ‘Is it real’ where you need to lookaround the text and that is the next improvement.

Probably should be stated that this regex works for double curly quote formatted books but not single - and I prefer to step through the file rather than a replace all.

Quote:
[ ]?‘(?i)(\d\d|ad[n]{0,1}|app[yines]{0,5}|appen[eds]{0,2}|ard[er]{0,2}|arf|alf|ang|as|at|av[ein]{0,3}|bout|bye|cause|cept[ing]{0,3}|copter[s]{0,1}|cos|cross|cuz|couse|e[emr]{0,1}|ell|elp[edling]{0,5}|ere[abouts]{0,5}|eard|f|fraid|fore|id|igh[er]{0,2}|ighness|im|is|isself|gainst|kay|less|mongst| n|nd|neath|nough|nother|nuff|o[o]{0,1}|ood|ome|ow|op[eding]{0,3}|oney|orse[flesh]{0,5}|ouse[ds]{0,1}|pon|puter[edrs]{0,2}|round|scuse[ds]{0,1}|spect[sed]{0,2}|scaped|sides|tween|special[ly]{0,2}|stead|t|taint|til|tis|twas|twere|twould|twil l|ud|un|urt|vise)([\p{P}|\s])
Steadyhands is offline   Reply With Quote
Old 01-03-2016, 11:20 AM   #155
CalibUser
Zealot
CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.
 
Posts: 143
Karma: 61844
Join Date: Jul 2015
Device: Sony
Updates to the plugin include:
  • the plugin will only run if the version of Sigil used is 9.1 or greater; there is a risk that a bug in Sigil version 0.9.0 will corrupt your eBook so the plugin will only work if the version of Sigil is 9.1 or greater.
  • an improvement by Steadyhands to the code for words that are preceded by an apostrophe in the wrong direction.

Quote:
Originally Posted by Steadyhands View Post
Still not 100% perfect but much better then before.
The plugin will never be 100% perfect - unfortunately sometimes judgement is needed to correct the final text; the intention of the plugin was to automatically tidy up common errors in ePub files that had been OCR'd to speed up the process of correcting text and then use manual tweaks to correct any remaining errors.

Quote:
Originally Posted by Steadyhands View Post
Probably should be stated that this regex works for double curly quote formatted books but not single. There are still issues with false positives for text like ‘At the sound of’ and ‘Is it real’ where you need to lookaround the text and that is the next improvement.
I have ensured that the updated code will run only run if quotes used for speech are not single curly quotes to reduce these types of errors.

Quote:
Originally Posted by Steadyhands View Post
I prefer to step through the file rather than a replace all.
Some users may wish to copy and paste the code by Steadyhands into the "Find" box in Sigil and do a manual search and replace where the quotes used for speech are single curly quotes. The plugin will do a 'replace all' for ePub books in which quotes used for speech are not single curly quotes.
CalibUser is offline   Reply With Quote
Advert
Old 12-23-2016, 12:37 PM   #156
Kiruhdu
Member
Kiruhdu began at the beginning.
 
Kiruhdu's Avatar
 
Posts: 10
Karma: 10
Join Date: Mar 2014
Device: Pocket Book Touch Lux 3
Manual and other question

Hi folks

Sorry for the maybe silly questions!

Where can I find the manual which the plugin does reference?

Is there a way to process all html|xhtml files in an epub at once?

Thanks in advance!
Kiruhdu is offline   Reply With Quote
Old 12-23-2016, 03:59 PM   #157
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,350
Karma: 14316543
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by Kiruhdu View Post
Where can I find the manual which the plugin does reference?
It's attached to the first post as an epub
Doitsu is offline   Reply With Quote
Old 12-24-2016, 11:15 AM   #158
Kiruhdu
Member
Kiruhdu began at the beginning.
 
Kiruhdu's Avatar
 
Posts: 10
Karma: 10
Join Date: Mar 2014
Device: Pocket Book Touch Lux 3
Quote:
Originally Posted by Doitsu View Post
It's attached to the first post as an epub
Thanks a lot man - I've seen it, but didn't realize...

Sorry!
Kiruhdu is offline   Reply With Quote
Old 09-01-2017, 03:16 PM   #159
Kiruhdu
Member
Kiruhdu began at the beginning.
 
Kiruhdu's Avatar
 
Posts: 10
Karma: 10
Join Date: Mar 2014
Device: Pocket Book Touch Lux 3
Cannot import the PIL library

Hi

I'd have to install a new Win 10 according to a crash of one of my Hds.

Since this I get always I run the tidy-tool the message

Status: success

Cannot import PIL library

Python Laucher Version: 20170227
Published version 2.0.0.5A
Installed version 2.0.0.5A
You have the latest version of this plugin
===========================================
Cannot find the dictionary for your language.
Dictionaries for English (UK), English (USA), French, German and Spanish are installed with Sigil.
If you need a dictionary for a different language please install an appropriate Hunspell dictionary
in the folder hunspell_dictionaries in the Sigil program folder.
===========================================


My Language is German and the dictionaries are installed...

Has anyone an idea what to do?

Much thanks in advance.
Kiruhdu is offline   Reply With Quote
Old 09-01-2017, 03:32 PM   #160
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 19,361
Karma: 99455064
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
As far as the PIL import error; make sure the "Use Bundled Python" checkbox is checked in Preferences->Manage Plugins.
DiapDealer is offline   Reply With Quote
Old 09-01-2017, 04:06 PM   #161
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 4,350
Karma: 14316543
Join Date: Dec 2010
Device: Kindle PW2
Apparently the plugin doesn't check the supported spell-check languages. For example, it offers Greek as a language option, even though no Greek dictionary is installed on my machine.
I.e., even though you can select German from the drop-down list, the plugin might not have found the German dictionaries. (It looks for de_DE.aff and de_DE.dic in the hunspell_dictionaries folder, which exists in both the main Sigil program folder and the Sigil preferences folder.)

a) To display the main Sigil folder right-click the Sigil desktop icon and select Dateipfad öffnen (Open file location).

b) To display the Sigil preferences folder open Sigil, press F5 and and click Ordner Einstellungen öffnen (Open Preferences Location).

Double-check that de_DE.aff and de_DE.dic exist in at least one of the hunspell_dictionaries folders.

Last edited by Doitsu; 09-01-2017 at 04:09 PM.
Doitsu is offline   Reply With Quote
Old 06-05-2018, 01:59 AM   #162
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 380
Karma: 3547136
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Problem

Hi

I use ePubtidy a lot but sometimes I get the problem illustrated by the attached image. If you gave time available could you have a look at it please.
Attached Thumbnails
Click image for larger version

Name:	Screenshot.jpg
Views:	121
Size:	608.8 KB
ID:	164304  
Thasaidon is offline   Reply With Quote
Old 06-05-2018, 02:27 PM   #163
CalibUser
Zealot
CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.
 
Posts: 143
Karma: 61844
Join Date: Jul 2015
Device: Sony
@Thasaidon

I am not sure what the problem is - please describe the issue. Is it that the names of the included tags go off the scroll box?
CalibUser is offline   Reply With Quote
Old 06-05-2018, 09:05 PM   #164
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 380
Karma: 3547136
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Sorry. I should have given more of an explanation.

Basically it is not possible to access all the tags on the right because they go off the screen and I cannot access the 'OK' button

This would not matter if I could access the "OK" button at the bottom of the screen as I could access those tags that are visible and click on "OK". I could then run the plugin again and hopefully the number of tags would have been reduced enough so I can access the rest.
Thasaidon is offline   Reply With Quote
Old 06-06-2018, 12:51 PM   #165
CalibUser
Zealot
CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.CalibUser has a propeller beanie that spins backward.
 
Posts: 143
Karma: 61844
Join Date: Jul 2015
Device: Sony
@Thasaidon:

I will try to find some time this coming weekend to look at this issue.
CalibUser is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tidying Up My Kindle selectortone Calibre 2 07-17-2013 11:35 AM
developping a Plugin for Presentation files abdlink Plugins 4 04-15-2013 12:27 PM
Plugin to fix fb2 files oviksna Plugins 3 01-28-2013 09:53 AM
Tidying Up My Library JayLaFunk Library Management 2 09-20-2011 10:12 AM
Calibre 0.7.50 can't see plugin files mb_webguy Calibre 5 04-29-2011 04:41 AM


All times are GMT -4. The time now is 08:55 AM.


MobileRead.com is a privately owned, operated and funded community.