View Single Post
Old 09-02-2014, 06:56 PM   #22
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,700
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Tex2002ans View Post
Therein lies a large problem, you need an algorithm that is not just situational, but takes into account paragraphs at a time, the odd/even, or mismatching quotation marks (is there only a closing quote, with no opening quote in this paragraph? Are there two opening quotes in this paragraph?). And in hard cases, asking for manual intervention (really, the only way to fix some of these).
I disagree (about positional logic being a problem), but I'm OK with other opinions. Do give the plugin a workout. I simply stopped running into situations where the quotation conversion didn't work as I expected it to. The algorithm just doesn't care if there are two opening quotes (or no closing quote). It's not designed to "fix," or match, quotation marks. It just guesses what should be an opening quote or a closing quote or an apostrophe. It's guessing extremely well in my experience. Granted; I'm sure there's certain complex quotation situations (or extra spacing between words and quotation marks) where the algorithm may fail ... but I gave up worrying about it. I don't deal with anything that complex (quotationally speaking). It handles nested quotes and continuation quotes (no closing quote for the previous para) just fine in my experience.

Quote:
Here was a bug where Kovid fixed "measurements" and "years" (like ’60s):

https://bugs.launchpad.net/calibre/+bug/1285351
Thanks for that, I need to make sure the version of SmartyPants I'm using in my plugin has that change incorporated.

Quote:
I could have SWORN there was a topic a few months back too, fixing up ’em, ’tis, ’twas, ... because I got this helpful Regex from someone which was a more condensed version of the one I used before (I did a search and couldn't find the topic!!):
You may appreciate the plugin's ability to consult a user-defined, custom list of words that start with apostrophes.
DiapDealer is offline   Reply With Quote