in reply to Re^3: Perl to convert US to UK punctuation/spelling?
in thread Perl to convert US to UK punctuation/spelling?

Good thoughts in this thread on the spelling conversion; have not had good luck in the past with outsourcing this kind of thing to India. Fortunately, the idioms will not need conversion; just basic spelling (center / centre). These 1k documents are part of a larger collection of about 24k documents to be published, and the rest are in British English and punctuation and the archive I'm working with is requiring that kidn of basic consistency between the documents.

In terms of quotations, now that I've thought about it more, there seems to be only one case I need to watch out for which is balanced single quotes inside double quotes, complicated potentially by an apostrophe somewhere in the double quotes as well; otherwise, single quotes in the docs stay as they are; in the British usage balanced single quotes in balanced double quotes become balanced double quotes in balanced single quotes; of course there may be a very few cases where the nesting is deeper. I've been thinking about whether there is a clever way to do this with a few s///g rather than checking a character stream....

Replies are listed 'Best First'.
Re^5: Perl to convert US to UK punctuation/spelling?
by swampyankee (Parson) on Jun 16, 2008 at 18:18 UTC

    If all you're concerned about is converting US to UK spelling and US to UK punctuation, I think you'd still need the results proofread. After all, I expect that you would want to avoid something like changing

    In US English, 're' is frequently changed to 'er', e.g., 'centre' becomes 'center'.

    to

    In US English, 're' is frequently changed to 'er', e.g., 'center' becomes 'center'.


    Information about American English usage here and here. Floating point issues? Please read this before posting. — emc

Re^5: Perl to convert US to UK punctuation/spelling?
by Gavin (Archbishop) on Jun 16, 2008 at 18:39 UTC

    "balanced single quotes inside double quotes, complicated potentially by an apostrophe somewhere in the double quotes as well;"

    99.9% of the population wouldn't know anyway.