Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-12-2020, 06:17 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
merge two dictionaries into one

Often I correct ebooks which use two or more languages, and running the spellcheck is a bit of a nightmare, because of course I can only select one of the dictionaries at a time, so all the words in the other language are marked as errors. Is there a way to create a new language that is the sum of the two? I tried "Hunspell merge", but it doesn't work.

Thanks
1v4n0 is offline   Reply With Quote
Old 04-12-2020, 07:27 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The calibre editor can check multilingual text just fine. Simply add the correct lang="whatever" and the editor will use the appropriate dictionary automatically, assuming it is available.
kovidgoyal is online now   Reply With Quote
Old 04-12-2020, 07:35 AM   #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
Thank you for your answer. Can you be more specific, please? Where should I change the language? I tried in the "content.opf" file, but it just resorts to English. Or can I add more languages? What's the code?
1v4n0 is offline   Reply With Quote
Old 04-12-2020, 07:38 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://developer.mozilla.org/en-US/...ttributes/lang
kovidgoyal is online now   Reply With Quote
Old 04-12-2020, 07:41 AM   #5
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
The problem is the text uses both languages within the same paragraph. It's a file that's already been written, I can't add <span>s around all the words that are in French. I need the spellcheck tool to recognize both the words in Italian and the ones in French.
1v4n0 is offline   Reply With Quote
Old 04-12-2020, 08:47 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Then you are out of luck. The Editor can spell check a given language using only a single dictionary and a custom word list. As for merging dictionaries, there may be a way, but not in calibre, it has no dictionary manipulation tools.
kovidgoyal is online now   Reply With Quote
Old 07-25-2020, 07:29 AM   #7
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
Bumping the thread. Finding a solution would save me so much time.
1v4n0 is offline   Reply With Quote
Old 07-25-2020, 12:12 PM   #8
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 35,498
Karma: 145557716
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by 1v4n0 View Post
Bumping the thread. Finding a solution would save me so much time.
The problem is that you want to be able to distinguish a word in French from a word in Italian. Unless you have the words marked, perhaps by the ebook language being set to French and content in Italian being marked as being in Italian, your computer has no way of knowing which dictionary to use unless you want all words checked against both dictionaries which would give rather interesting results.
DNSB is offline   Reply With Quote
Old 07-25-2020, 03:46 PM   #9
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
Yes, I need words checked against both dictionaries, and marked as error only if they don't belong to either. Or, and that is the same logic, I want to check the words against a custom dictionary that is the sum of the Italian and the French one.

You know, those long, highly specific manuals with thousands of foreign words, book titles, and so on.
1v4n0 is offline   Reply With Quote
Old 07-25-2020, 05:23 PM   #10
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,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
The calibre editor uses Hunpell dictionaries, so maybe this can help:

Use multiple languages at once for the dictionary? - Super User

A search for "combine two hunspell dictionaries" may find other solutions.

BR
BetterRed is online now   Reply With Quote
Old 07-26-2020, 05:15 AM   #11
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 tried Hunspell Merge (which is precisely what I'm looking for), but for some reason it gets stuck when analyzing the Italian dictionary (and this happens only with the Italian dictionary, I've tried merging others and it works. I have zero idea how those .dic files work, so I can't tell what the problem is).

I get this message on the command prompt when running Hunspell merge

Exception in thread "Thread-0" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at hunspell.merge.DicReader.readLine(DicReader.java:3 2)
at hunspell.merge.FileReader.readFile(FileReader.java :29)
at hunspell.merge.DictionaryFile.readFiles(Dictionary File.java:113)
at hunspell.merge.HunspellMerge.createDictionariesImp l(HunspellMerge.java:339)
at hunspell.merge.HunspellMerge.access$1500(HunspellM erge.java:25)
at hunspell.merge.HunspellMerge$9$1.run(HunspellMerge .java:323)
at java.base/java.lang.Thread.run(Thread.java:834)

Last edited by 1v4n0; 07-26-2020 at 05:25 AM.
1v4n0 is offline   Reply With Quote
Old 07-26-2020, 06:17 AM   #12
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,583
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Try to find another Italian hunspell dictionary, Apache might have some, otherwise you will have to log an 'Issue' (on the left) at Google code.

BR

Last edited by BetterRed; 07-26-2020 at 06:19 AM.
BetterRed is online now   Reply With Quote
Old 08-02-2020, 03:56 AM   #13
Doitsu
Grand Sorcerer
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: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by 1v4n0 View Post
Bumping the thread. Finding a solution would save me so much time.
BTW, KevinH considers allowing users to select a secondary Hunspell dictionary in a future Sigil version. However, so far there hasn't been much interest in it. If you're also a Sigil user and you'd like KevinH to add this feature, please reply to the thread.
Doitsu is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge .zip Dictionaries Majorix Kobo Reader 9 10-28-2019 03:09 AM
Merge books, how to select FIRST book or MERGE metadata? rboatright Library Management 11 08-20-2016 11:01 AM
Just What Does Merge Do? Pinecone Library Management 5 01-29-2011 06:43 AM
What exactly does merge do? bigpallooka Calibre 15 11-24-2010 06:58 PM
Merge feature request (different merge) Tarran Calibre 1 05-24-2010 10:57 AM


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


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