Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2016, 11:40 AM   #1
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 171
Karma: 40000
Join Date: Oct 2013
Device: kindle
Question Spellcheck for two languages at the same time?

Hello, is there a way to have the spellcheck work for two languages at the same time, i.e. to only list words that don't exist neither in language A nor in language B?

I have some almost-bilingual books that give me heaps of false positives.

Thanks,
i
1v4n0 is offline   Reply With Quote
Old 11-23-2016, 03:33 PM   #2
BetterRed
null operator (he/him)
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: 20,642
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by 1v4n0 View Post
. . . is there a way to have the spellcheck work for two languages at the same time . . . ?
@1v4n0 - yes.

You may have to install the required language dictionaries via Preferences->Editor Settings->Add dictionaries - the dictionaries must be oxt files, which are available from Libre Office etc.

Then for each language you can select the required variant (Swiss French, Chilean Spanish, UK English etc). The text must be marked with a language if its not the same as language specified for the book - e.g. if the book has its language set to French, then English and Spanish text must be tagged appropriately.

BR
BetterRed is offline   Reply With Quote
Advert
Old 11-23-2016, 05:14 PM   #3
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 171
Karma: 40000
Join Date: Oct 2013
Device: kindle
Edit: I just understood that the language of the spellcheck is the one specified in the dc:language tag in the "content.opf" file. So now the question becomes, can I specify more than one language? I tried having two language tags but it only read the first one. I tried writing "en+es", "en,es", and so on, but it didn't work.


@BetterRed So each Spanish word has to be tagged within the text? That's impossible in my case, or at least it would make the whole thing useless. (It's not that I have chapters in one language and chapters in another one. The two are mingled). What I would like to have is the possibility of saying to Calibre "get me all the words in this book that are neither English nor Spanish".


Hope I made myself clear, and thank you anyway.

Last edited by 1v4n0; 11-23-2016 at 05:35 PM.
1v4n0 is offline   Reply With Quote
Old 11-23-2016, 06:44 PM   #4
BetterRed
null operator (he/him)
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: 20,642
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by 1v4n0 View Post
@BetterRed So each Spanish word has to be tagged within the text?
That's my understanding, but not each word if there are several Spanish words in succession.

I write in Word, where it's easy to set the language on a paragraph, sentence, phrase etc - as I write them. So by the time I get to an epub editor the language tags are there already. I would imagine its similarly easy in Writer.

I can barely imagine doing it later even in a Word document, unless its just a few words here and there. I certainly can't imagine me doing it in an XHTML code editor - what a horrifying thought.

BR

Last edited by BetterRed; 11-23-2016 at 10:13 PM.
BetterRed is offline   Reply With Quote
Old 11-24-2016, 03:21 PM   #5
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,161
Karma: 1404241
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
In addition to what BetterRed already said, there are only some workarounds possible.

You can only use more than one normal dictionaries if you tell calibre that a special word, a paragraph, a html file in a document is in a particular language that differs from the main language. As BetterRed already pointed, doing the stuff word wise will be a horrifying job.

So, if you need to do this, do it outside and import your work again in the editor.

An other workaround is to use more than one user defined dictionary. That's what I do if I had more than one language involved. To generate a specific additional language dictionary I change the main language definition from e.g. English (main, 1st) to Spanish (additional, 2nd) and copy all accurate words in an additional user dictionary via clipboard. If not already done, create in the editor a new user dictionary and paste your word listing via import dialog into the new user dictionary. Don't forget to assign as import language your main language (English) for your non english words.

Last edited by Divingduck; 11-24-2016 at 03:23 PM.
Divingduck is offline   Reply With Quote
Advert
Old 11-24-2016, 04:58 PM   #6
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 171
Karma: 40000
Join Date: Oct 2013
Device: kindle
So I have to C/P all the words of one language into the other one? How do I do that? Opening the OXT file with winrar and editing the DAT within, copying and pasting from one dictionary to the user dictionary editor?
And then?
What do you mean by "copy all accurate words"?

Thanks
1v4n0 is offline   Reply With Quote
Old 11-25-2016, 02:29 AM   #7
BetterRed
null operator (he/him)
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: 20,642
Karma: 26960534
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Divingduck View Post
...

An other workaround is to use more than one user defined dictionary. That's what I do if I had more than one language involved. To generate a specific additional language dictionary I change the main language definition from e.g. English (main, 1st) to Spanish (additional, 2nd) and copy all accurate words in an additional user dictionary via clipboard. If not already done, create in the editor a new user dictionary and paste your word listing via import dialog into the new user dictionary. Don't forget to assign as import language your main language (English) for your non english words.
@DivingDuck - but that would seem to assume the following:

When the book is marked Spanish and checked against a Spanish Dictionary that all correctly spelt words are Spanish.

But there might be a misspelt English word amongst them. Or the word might be used in both Spanish and English - e.g. traduce, which has quite different meanings in English and Spanish, even though they share a common Latin root.

Does the spell checker make use of the User Dictionaries in compiling its suggestions list, I have a vague memory it doesn't.

But surely, the raison d'être for tagging the actual text with the correct language code, is so that the reader can use the dictionary lookup feature on their device to get the 'meaning of the word' -- the spell checker is a merely a means to that end.

When I'm reading a bi-lingual text, as I was this morning (Dutch/English - hard going), I go in and out of dictionaries all the time - if all the text was marked up as English I'd be more than a little annoyed.

BR

Last edited by BetterRed; 11-25-2016 at 02:31 AM.
BetterRed is offline   Reply With Quote
Old 02-14-2017, 09:47 AM   #8
1v4n0
Groupie
1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.1v4n0 writes the songs that make the whole world sing.
 
Posts: 171
Karma: 40000
Join Date: Oct 2013
Device: kindle
I found a way, but it's very partial (can you say "very partial"?). I opened the OXT dictionary file with winrar, found the file with the word list (it's the file with the same name as the dictionary inside the subfolder with the same name), edited out with N++ all the characters that weren't letters (some numbers and slashes), and copy/pasted them in calibre editor/preferences/editor settings/manage dictionaries/manage user dictionaries/import list of words.

This way it recognizes the words, BUT those words are not ALL the words, because, for example, all the verbal forms are not there.

So, not much progress. Any help?
1v4n0 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spellcheck and apostrophes jcsalomon Sigil 83 01-25-2017 12:48 PM
Multilanguage spellcheck varlog Sigil 1 09-28-2016 11:45 PM
Spellcheck and some notes. brolny Sigil 0 11-24-2015 04:37 AM
Add Spellcheck Dictionary Leonatus Editor 6 02-12-2015 12:16 PM
SPELLCHECK NATION: Does SpellCheck have a dark side? cbaehr Self-Promotions by Authors and Publishers 10 11-07-2010 12:45 PM


All times are GMT -4. The time now is 10:42 AM.


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