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

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 10-11-2018, 03:12 AM   #1
RickC998
Junior Member
RickC998 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2018
Device: iPad
Dictionary questions

I have the Calibre 3.3.2 Editor set to use United Kingdom as the 'preferred variant for the English language'.

Q1. Why do words like 'centre' show as misspelled? (i.e. wavy red underline) Is there another setting other than in Edit > Preferences > Editor settings > Manage spelling dictionaries?

Q2. Is is possible to get rid of some of the suggested alternatives (like 'cent re' and/or 'cent-re')?

Click image for larger version

Name:	calibre-spellcheck.png
Views:	29
Size:	5.7 KB
ID:	166849
RickC998 is offline   Reply With Quote
Old 10-11-2018, 05:06 AM   #2
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 11,078
Karma: 10563148
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@RickC998 - try this

Have a look at the language in the opf file, if it's 'en-us' I think it checks against US spellings, similarly 'en-uk' would check against UK spellings etc.

Best thing is to set it to 'en' in the OPF, then the selected dictionary variant should determine which spelling variants (US, UK, Australian etc) are used to check against.

BR
BetterRed is online now   Reply With Quote
Advert
Old 10-11-2018, 06:57 PM   #3
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,055
Karma: 6000097
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by BetterRed View Post
Have a look at the language in the opf file, if it's 'en-us' I think it checks against US spellings, similarly 'en-uk' would check against UK spellings etc.
One minor correction: en-GB is British. There is no en-UK.
Tex2002ans is offline   Reply With Quote
Old 10-11-2018, 07:17 PM   #4
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 11,078
Karma: 10563148
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Tex2002ans View Post
One minor correction: en-GB is British. There is no en-UK.
if the nationalists (Scottish, Irish and English) get their way there will be no (anything) UK (anything).

BR

Last edited by BetterRed; 10-14-2018 at 06:57 AM.
BetterRed is online now   Reply With Quote
Old 10-14-2018, 04:09 AM   #5
RickC998
Junior Member
RickC998 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2018
Device: iPad
Quote:
Originally Posted by BetterRed View Post
Have a look at the language in the opf file, if it's 'en-us' I think it checks against US spellings, similarly 'en-uk' would check against UK spellings etc.

Best thing is to set it to 'en' in the OPF, then the selected dictionary variant should determine which spelling variants (US, UK, Australian etc) are used to check against.
Many thanks for your reply. It was set to just 'en' in the OPF file. I changed it to 'en-uk', saved the change, closed and re-opened the ebook but 'centre' still showed as a spelling error. I checked the OPF file and the setting had been changed from 'en-uk' back to 'en' again.

I ran out of time to do any more testing so next time I see the same situation occur I'll try 'en-GB' instead.
RickC998 is offline   Reply With Quote
Advert
Old 10-14-2018, 07:33 AM   #6
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 11,078
Karma: 10563148
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by RickC998 View Post
Many thanks for your reply. It was set to just 'en' in the OPF file. I changed it to 'en-uk', saved the change, closed and re-opened the ebook but 'centre' still showed as a spelling error. I checked the OPF file and the setting had been changed from 'en-uk' back to 'en' again.

I ran out of time to do any more testing so next time I see the same situation occur I'll try 'en-GB' instead.
Sorry for the bum steer on 'en-uk' instead of 'en-gb', blame Brexit.

But as I understand it: if the language setting in the opf is 'en' and the dictionary setting in Preferences is United Kingdom, then the spell check should be using the en-GB dictionary, as per the Dictionary selection dialogue in Editor->Preferences:

Quote:
You can change the dictionaries used for any specified language.

A language can have many country specific variants. Each of these variants can have one or more dictionaries assigned to it. The default variant for each language is shown in bold to the left.

You can change the default country variant as well as changing the dictionaries used for every variant.

When a book specifies its language as a plain language, without any country variant, the default variant you choose here will be used.
This is how it works for me, but I should add I do not use the English dictionary that's shipped with calibre.

BR
BetterRed is online now   Reply With Quote
Old 10-14-2018, 08:49 AM   #7
Brett Merkey
Enthusiast
Brett Merkey will become famous soon enoughBrett Merkey will become famous soon enoughBrett Merkey will become famous soon enoughBrett Merkey will become famous soon enoughBrett Merkey will become famous soon enoughBrett Merkey will become famous soon enough
 
Posts: 33
Karma: 500
Join Date: Jul 2015
Device: Paperwhite 3
I encountered the same problem a few times. Installed default dictionary and .opf file settings were getting over-ruled in the spell check. The cause turned out to be meta tag settings in each html page, like so:

Code:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en-us" xml:lang="en-us">
Check to see if that is what is going on here.

Last edited by Brett Merkey; 10-14-2018 at 08:51 AM.
Brett Merkey is offline   Reply With Quote
Old 10-14-2018, 07:11 PM   #8
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,055
Karma: 6000097
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by Brett Merkey View Post
I encountered the same problem a few times. Installed default dictionary and .opf file settings were getting over-ruled in the spell check. The cause turned out to be meta tag settings in each html page [...]
This is a good idea to check too.

There's a handful of locations language can be set, going from "highest" to "lowest" level:

1. The overall book's language is set in the book's metadata.

Sigil has an easy way to look at this (Tools > Metadata Editor):

Click image for larger version

Name:	SigilMetadataEditorLanguage.png
Views:	5
Size:	4.8 KB
ID:	166922

Or, if you want to manually look inside of the content.opf file, you'll be looking for a line like this:

Code:
<dc:language>en</dc:language>
2. Search for a lang and/or xml:lang in your HTML:

Quote:
<html [...] lang="en-US" xml:lang="en-US">
Like Brett Merkey said, it can be located anywhere within the HTML.

Side Note: Often, it can even be used at the paragraph- or word-level:

Quote:
<p lang="en">This is an example of an <span lang="es">español</span> word within an English text.</p>
3. If you go into Calibre Editor's Spellcheck, Tools > Check Spelling (Alt+F7), you can see a Language column:

Click image for larger version

Name:	CalibreSpellcheckLanguageColumn.png
Views:	7
Size:	11.2 KB
ID:	166921

This will show you what Language a lot of your book is.
  • en = English
  • en-US = English (US) = US English
  • en-GB = English (GB) = British English

Like BetterRed said, if the book is set to just English, Calibre should spellcheck using whatever your overall Calibre is set to (either US or British dictionaries).
Tex2002ans is offline   Reply With Quote
Old 10-15-2018, 05:14 PM   #9
RickC998
Junior Member
RickC998 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2018
Device: iPad
Thank you all. It was indeed an issue with this meta tag, now corrected from "en-US" to "en-GB" on each page:

Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
Biggest problem was my lack of experience... so I've learned a lot.

Thank you all once again.
RickC998 is offline   Reply With Quote
Old 10-15-2018, 06:39 PM   #10
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 1,055
Karma: 6000097
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by RickC998 View Post
Thank you all. It was indeed an issue with this meta tag, now corrected from "en-US" to "en-GB" on each page

[...]

Biggest problem was my lack of experience... so I've learned a lot.


You may also want to add lang as well.

Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB">
Search: xml:lang="en-GB"
Replace: lang="en-GB" xml:lang="en-GB"

Some tools/browsers/readers may support one or the other. So including both should make language work wherever.
Tex2002ans is offline   Reply With Quote
Old 10-15-2018, 06:56 PM   #11
RickC998
Junior Member
RickC998 began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2018
Device: iPad
Quote:
Originally Posted by Tex2002ans
You may also want to add lang as well.

Code:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-GB" xml:lang="en-GB">
Search: xml:lang="en-GB"
Replace: lang="en-GB" xml:lang="en-GB"

Some tools/browsers/readers may support one or the other. So including both should make language work wherever.
Good tip... many thanks.
RickC998 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
Aura H2O custom dictionary and other questions Jade Aislin Kobo Reader 3 03-31-2016 02:05 AM
Some dictionary questions iamosam Kobo Reader 1 09-01-2013 09:21 AM
360 Some more dictionary questions omk3 PocketBook 0 02-25-2011 05:48 PM
360 dictionary questions franklekens PocketBook 4 03-01-2010 05:54 AM
Questions about Dictionary hack enarchay Sony Reader Dev Corner 4 06-12-2009 01:51 PM


All times are GMT -4. The time now is 05:11 AM.


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