Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 08-14-2011, 05:37 AM   #16
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Yes, ’ is definitely preferable in this case, but this is worth bearing in mind if you want to set the straight quote.

But you learn not to trust anything in this game - while all ePub readers should handle ' perfectly fine (ADE does for instance), there are some, particularly the online readers, that don't. O'Reilly's bookworm reader from Threepress is guilty of this.
charleski is offline   Reply With Quote
Old 08-14-2011, 05:50 AM   #17
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by charleski View Post
Yes, ’ is definitely preferable in this case, but this is worth bearing in mind if you want to set the straight quote.
In text content, just using the ' character (no entities) is enough, it's only in attribute values that ' or &# 39; might be needed, I believe.
Jellby is offline   Reply With Quote
Advert
Old 08-17-2011, 03:19 PM   #18
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
I guess it's too late to help, but I've just finished fiddling with a script to help me scan for the apostrophe / open-quote problem, by skipping over unambiguous cases like

'Hullo!' she shouted.

It should be pretty helpful for UK-style novels which use single-quotes for dialog.

It's designed to handle most html markup. (Argh, it doesn't handle ' ! But I can fix that easily enough.).

No documentation yet, other than what you get from "quotes.py --help". It's possible to learn what it does in particular cases by running it on the example files in the GitHub repository.

Basically, the ambiguities that remain get marked with a "*", and then you can search the output for that. It also checks for stuff like open-quotes with no matching close-quote, which is marked with a "#".

<p>‘Twasn’t my fault #[‘]</p>

On the flip side, that means it triggers on multi-paragraph dialogue, where the convention is to omit all but the last closing quote.

<p>‘You know what happens if you talk too much? No? I'll tell you what. #[‘]</p>
<p>‘You get a whole ’*nother paragraph of dialogue.’</p>

[but you can avoid those and just get the "*"s, by running it as "quotes.py --apostrophes"].
sourcejedi is offline   Reply With Quote
Old 08-17-2011, 04:16 PM   #19
NeilPet
Junior Member
NeilPet began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2011
Location: Calgary, Alberta
Device: iPad
Any good style guide can give you instructions on when to use apostrophes (single and double) or straight inch/foot marks.

Doing a conversion manually is a pain.

Try searching for a space followed by an inch- or foot-mark and replacing it with an open-quote or double-quote mark, then searching for an inch- or foot-mark followed by a space and replacing that with an close-quote or double-quote mark. Don't forget to include the appropriate space in the replace field. THEN, search for foot-marks alone and replace them with close-quote marks. That takes care of the possessives.

Once that's all done, do a search for "open-quote Tis", and replace it with "close-quote Tis", and so on...
NeilPet is offline   Reply With Quote
Old 08-18-2011, 02:29 AM   #20
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by NeilPet View Post
Try searching for a space followed by an inch- or foot-mark and replacing it with an open-quote or double-quote mark, then searching for an inch- or foot-mark followed by a space and replacing that with an close-quote or double-quote mark. Don't forget to include the appropriate space in the replace field.
How does this work for open or close quotes at the start or end of paragraphs?
HarryT is offline   Reply With Quote
Advert
Old 08-18-2011, 04:20 AM   #21
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by sourcejedi View Post
Basically, the ambiguities that remain get marked with a "*", and then you can search the output for that. It also checks for stuff like open-quotes with no matching close-quote, which is marked with a "#".

<p>‘Twasn’t my fault #[‘]</p>
And isn't the leading "quote" in "‘Twasn’t" marked? That's wrong, then

It would be good if it could mark apostrophes and closing single quotes with different characters.
Jellby is offline   Reply With Quote
Old 08-18-2011, 06:54 AM   #22
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
Quote:
Originally Posted by Jellby View Post
That's wrong
Nope, but I wasn't being very clear.

Input: <p>‘Twasn’t my fault</p>
Output: <p>‘Twasn’t my fault #[‘]</p>

Search for #. See the error marker. The bit after the # tells you there's an unclosed single-open-quote; you have to scan backwards to find it. Having found it, you have to figure out that it needs to be changed to a proper apostrophe.

It's a very crude implementation. I took the simple regular expressions I've been using, and rewrote them in python on top of an XML tokenizer, so it should work on quotes coded in several different ways, and even on gnarly html generated by MSWord. It's nothing you can't do with the regular expressions, but it seems quite error-prone to keep adapting the regular expressions to work on different files.

Quote:
It would be good if it could mark apostrophes and closing single quotes with different characters.
It's not possible to distinguish unambiguously between apostrophes and closing single quotes in all cases.

<p>Rock 'n' Roll</p>

I don't want to miss those cases - if I wasn't going to bother, I'd stick with straight quotes. I don't trust myself to program an exhaustive set of exceptions that still avoids accepting any errors. I don't trust myself to notice every single case just from reading the book, or I wouldn't need the script in the first place. (And having to squint at every single quote mark is not good for my eyesight).

So the script skips everything that's definitely _not_ an apostrophe (because it's not immediately after a word), and flags all the remaining apostrophe-like characters for review.

<p>Rock ‘n’* Roll *</p>

(The second * indicates that the paragraph contains exactly one unambiguous open-quote, so that exactly one of the starred apostrophes is playing the role of an close-quote. But that's wrong, which means there must be an error: the open-quote character needs to be changed to become an apostrophe).

The second * can also appear in the middle of a paragraph, if the open-single-quote is inside double quotes

<p>"Rock 'n' Roll", shouted.</p>
<p>“Rock ‘n’* Roll” *, shouted.</p>

so if there's more than one double-quoted part which contains ambiguous single quotes, you review them separately.

The other feature is it keeps a bunch of statistics, so you get an overview of the file without having to read it. (Useful if you want to know what sort of errors to look out for, particularly if you don't want to "spoil" yourself on the book before you read it for the first time).
sourcejedi is offline   Reply With Quote
Old 08-18-2011, 07:41 AM   #23
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by sourcejedi View Post
So the script skips everything that's definitely _not_ an apostrophe (because it's not immediately after a word), and flags all the remaining apostrophe-like characters for review.

<p>Rock ‘n’* Roll *</p>

(The second * indicates that the paragraph contains exactly one unambiguous open-quote, so that exactly one of the starred apostrophes is playing the role of an close-quote. But that's wrong, which means there must be an error: the open-quote character needs to be changed to become an apostrophe).
Do you call the first apostrope in "Rock 'n' Roll" an "unambiguous open-quote"? And do you say that it's "definitely _not_ an apostrophe"? I'm not criticizing the script, just trying to understand the nomenclature
Jellby is offline   Reply With Quote
Old 08-18-2011, 08:20 AM   #24
sourcejedi
Groupie
sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.sourcejedi ought to be getting tired of karma fortunes by now.
 
sourcejedi's Avatar
 
Posts: 155
Karma: 200000
Join Date: Dec 2009
Location: Britania
Device: Android
Sorry, that was redundant. The script focuses on the ambiguity between curly-closing-quotes / apostrophes. In that sense, open-quote characters are always unambiguous.

Questions are welcome, that's why I posted. I think the script is about as good I can make it, but there wasn't much point putting it online if I can't work out how to explain it .

Last edited by sourcejedi; 08-18-2011 at 08:36 AM.
sourcejedi is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free book (Kobo) Twas The Night arcadata Deals and Resources (No Self-Promotion or Affiliate Links) 2 12-24-2011 12:01 AM
Free Book (EPUB) - Twas The Night [ENDED] koland Deals and Resources (No Self-Promotion or Affiliate Links) 2 12-12-2010 06:15 PM
Kindle DX handle ? nimblem Amazon Kindle 0 08-14-2010 03:17 PM
So, how do YOU handle stress? desertgrandma Lounge 141 05-09-2009 04:13 AM
Poetry Moore, Clement C.: Twas The Night Before Christmas [Illus.]. v1. 08 Dec. 08 Dr. Drib BBeB/LRF Books 0 12-08-2008 03:43 PM


All times are GMT -4. The time now is 04:46 PM.


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