Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-26-2020, 04:45 AM   #1
mcdummy
Connoisseur
mcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the rough
 
mcdummy's Avatar
 
Posts: 56
Karma: 7130
Join Date: Apr 2015
Device: PRS-T3
Using more than one dictionary at the same time

As far as I understand the dictionary handling of Sigil, it is possible to install dictionaries for several languages, but only one of them is used for checking an ebook.

Since I have have several ebooks that include passages in several languages, it would be helpful if the spell checking and highlighting of incorrect words in the editor would be able to switch languages within the text using, for instance, the lang-tag.

Regards,

McDummy
mcdummy is offline   Reply With Quote
Old 06-26-2020, 05:24 AM   #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,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
The calibre editor has support for spell checking multi-lingual text.

Someone (not Kevin or Doug), attempted add multi-lingual spell checking to Sigil but it never saw the light of day. I spell check in the calibre-editor, but do other editing in Sigil.

BR
BetterRed is online now   Reply With Quote
Old 06-26-2020, 06:04 AM   #3
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
Archival RoadMap: https://code.google.com/archive/p/si...s/RoadMap.wiki
Issue: https://github.com/Sigil-Ebook/Sigil/issues/218

This is not a trivial task. Patience is a virtue.
BeckyEbook is offline   Reply With Quote
Old 06-26-2020, 09:17 AM   #4
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
The issue is *not* doing a final spellcheck in multiple languages if the xml:lang or lang attribute is properly used using a dedicated spellcheck dialog. That is doable.

The issue is showing on the fly spelling mistakes (with red squiggly underlines) as you are editing the code itself in CodeView. The existence of potentially incomplete or broken code and the need to walk the tree back up the parent path to determine the language on the fly makes things hard to determine what language to check the just completed word in (and do it quickly).

If people could just live with looking up the word on the fly in *all* used languages during editing in CV but when using the Spell Check dialog, being able to choose the specific language to spellcheck in, that would greatly simplify things.

Last edited by KevinH; 06-26-2020 at 10:10 AM.
KevinH is offline   Reply With Quote
Old 06-26-2020, 08:22 PM   #5
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,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Kevin, I'd prefer to only have red squiggly's under the primary language errors, and a sortable language column in spell checker.

A spell checker bonus would be a list selector of languages found in the book (default would be 'All') so that I could focus on a particular language.

BR
BetterRed is online now   Reply With Quote
Old 06-26-2020, 08:46 PM   #6
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,428
Karma: 145525534
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
And if there was some way to force the authors to wrap foreign language bits properly so Sigil wouldn't be guessing what dictionary to use. Is it that hard to wrap your foreign language quotes in <span lang="fr">À chacun son goût</span> or <span class="el">Ημετέρα φύσις αι καθ' έξιν πράξεις εστί. Αριστεία ουν έξις (εστί)</span>?
DNSB is offline   Reply With Quote
Old 06-26-2020, 09:05 PM   #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,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I wouldn't expect Sigil to guess the language if its not marked up, but if it could, quelle surprise, it should be an settable option

BR

Last edited by BetterRed; 06-26-2020 at 09:50 PM.
BetterRed is online now   Reply With Quote
Old 06-28-2020, 07:24 AM   #8
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 mcdummy View Post
Since I have have several ebooks that include passages in several languages, it would be helpful if the spell checking and highlighting of incorrect words in the editor would be able to switch languages within the text using, for instance, the lang-tag.
Many years ago, when varlog worked on implementing multi-language spell checking, I created a simple proof-of-concept validation plugin that checks foreign language segments wrapped in <span> tags with lang/xml:lang attributes.
It works like the EPUBCheck validation plugin. I.e., it'll display potential spelling errors in the validation window. (It won't add red wavy lines!)
If you're interested in testing it, PM me, and I'll send you a download link.
Doitsu is offline   Reply With Quote
Old 06-28-2020, 10:34 AM   #9
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,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Doitsu - so what happened to varlog's work. I did a little bit of testing for him, but I lost track - might have been when my old Linux laptop bit the dust.

BR
BetterRed is online now   Reply With Quote
Old 06-28-2020, 11:17 AM   #10
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 BetterRed View Post
@Doitsu - so what happened to varlog's work. I did a little bit of testing for him, but I lost track - might have been when my old Linux laptop bit the dust.
If I understand his development thread correctly, varlog didn't achieve his goal:

Quote:
Originally Posted by varlog View Post
Kevin: forget it. It is obscure feature: even the initiator wasn't motivated enough to check it out. I haven't achieved my original goal but had my fun anyway. Concentrate on epub 3. It is way more important.
Since the code is still available in the mlspell branch of the Sigil Github repository, maybe another developer will give it another try in the future.
Doitsu is offline   Reply With Quote
Old 06-28-2020, 11:42 AM   #11
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
FWIW, This will be my next project sometime after our next release. But real time during editing (ie. red squiggly) will be either all languages or main language limited. I am thinking, the main spellcheck dialogue will be the same as now but with a filter by language pull down added.

Something along those lines ...
KevinH is offline   Reply With Quote
Old 06-29-2020, 10:36 AM   #12
mcdummy
Connoisseur
mcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the rough
 
mcdummy's Avatar
 
Posts: 56
Karma: 7130
Join Date: Apr 2015
Device: PRS-T3
Quote:
Originally Posted by KevinH View Post
FWIW, This will be my next project sometime after our next release. But real time during editing (ie. red squiggly) will be either all languages or main language limited. I am thinking, the main spellcheck dialogue will be the same as now but with a filter by language pull down added.

Something along those lines ...
The following might not apply to sigil (so you can forget the rest), but I noticed in calbire that a problem could occur when a text in a first language (say lang1) contains passages in a second language (lang2) and the spell ckecker offers the options to jump to incorrectly spelled words.

For instance, assume that a word (e.g., "word-example") is spelled correctly in the second language, but not in the first language, and appears in the following manner:

<p lang="lang1">... <span lang="lang2">word-example</span> ... word-example ... </p>

When a simple search is applied which only uses "word-example" as search item to jump to the incorrectly spelled word, this search algorithm would also jump to the <span lang="lang"> instance, in which it is correctly spelled.
mcdummy is offline   Reply With Quote
Old 06-29-2020, 11:22 AM   #13
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,644
Karma: 5433388
Join Date: Nov 2009
Device: many
Yes, it should be rare that the same word would appear in two-different languages side by side.
What most people do not recognize is that once parsed, the text sits at the end of the node chain and so search must be used. Character offsets to specify a file position are simply messed up as soon as a replacement or change is performed.

Even a epub3 cfi needs and uses search/pattern matching to identify text segments.
KevinH is offline   Reply With Quote
Old 06-30-2020, 03:17 AM   #14
mcdummy
Connoisseur
mcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the roughmcdummy is a jewel in the rough
 
mcdummy's Avatar
 
Posts: 56
Karma: 7130
Join Date: Apr 2015
Device: PRS-T3
Quote:
Originally Posted by KevinH View Post
Yes, it should be rare that the same word would appear in two-different languages side by side.
That's actually more common that one might think, though the more general situation is

<p lang="lang1">... word-example ...</p>

...

<p lang="lang1">... <span lang="lang2">word-example</span> ...</p>

I've read many ebooks that are written in a first language, but contain terms or citations from other languages. If the creator of the ebook does not mark all instances of a word in the proper language, you end up with this situation.

Since my ebook reader applies hyphenation, reading the text gets quite annyoing, if words are not assigned to their proper language.
mcdummy is offline   Reply With Quote
Old 06-30-2020, 04:33 AM   #15
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: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by mcdummy View Post
That's actually more common that one might think,


Overlaps definitely occur more often than expected.

Latest example I've been using is:

"die" (German) = "the" (English)
"die" (English) = "sterben" (German)

It also has enormous overlap when mixing en-US (American) + en-GB (British) within the same book. (One of the latest books I converted was collection of 20 articles, about half and half.)

Quote:
Originally Posted by mcdummy View Post
Since my ebook reader applies hyphenation, reading the text gets quite annyoing, if words are not assigned to their proper language.


And which ereader are you using that applies proper hyphenation?

Does it work at the per-word level too? Or only works on a per-book's-language level?
Tex2002ans is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search in 2 dictionary in a same time akorx Kobo Reader 3 03-06-2020 09:30 AM
Bug in dictionary function, wish: upgrade to using multiple dictionaries at one time Bjarne Calibre 1 04-21-2019 05:13 AM
So I tried to use the dictionary on my PB360 for the first time... maxbookworm PocketBook 18 06-27-2010 08:29 PM
Dictionary lookup time tompe Bookeen 17 11-08-2008 12:19 PM


All times are GMT -4. The time now is 02:15 AM.


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