Blog Moved

Friday, August 5, 2016

Converting "Stitched" Pages from PDFs

More and more great books (including philosophy) are going out of copyright and so are appearing on public archives, like Project Gutenberg and archive.org. Unfortunately, though, many of these PDFs are constructed in a somewhat odd way, with each page consisting of several separate images that get "stitched" together. So if you try to extract the pages to run them through OCR, say, it ends up looking like you ran the pages through a shredder.

Fortunately, as I noted in an earlier post, we can use ImageMagick to fix this up. I'm having to do this often enough now that I've written a small script to automate the process. Here it is:
#!/usr/bin/perl
my @splits = @ARGV;
my $start = shift @splits;
my $stop = shift @splits;
sub normalize {
        my $in = shift;
        if ($in < 100) { $in = "0$in"; }
        if ($in < 10) { $in = "0$in"; }
        return $in;
}
my $newpage = 1;
while (1) {
        my @files;
        for (my $i = $start; $i < $stop; $i++) {
                push @files, "*" . normalize($i) . ".pbm";
        }
        my $cmd = "convert " . join(" ", @files) . " -append outpage" . normalize($newpage) . ".tiff";
        print "$cmd\n\n";
        system($cmd);
        my $lasttime = scalar @splits;
        last if $lasttime == 0;
        $start = $stop;
        $stop = shift @splits;
        $newpage++;
}

The script can also be downloaded here.

There are two ways to invoke the program.

stitch_pages -n INIT STEP PAGES

In this case, INIT gives the number of the first image (this will usually be 0 or 1); STEP tells how many images are used to construct each page; and PAGES tells how many pages we are constructing.

Obviously, this assumes that there are the same number of partial images for each page. If that is not true, you can use the other form and specify the "splits" manually.

stitch_pages -s SPLIT1 SPLIT2 ... SPLITn

In this case, we will stitch together the partial images SPLIT1 - (SPLIT2 - 1), etc. The last split given should thus be one greater than the last image available.

New Paper: Logicism, Ontology, and the Epistemology of Second-Order Logic

Forthcoming in Ivette Fred and Jessica Leech, eds, Being Necessary: Themes of Ontology and Modality from the Work of Bob Hale (Oxford: Oxford University Press)
 
In two recent papers, Bob Hale has attempted to free second-order logic of the 'staggering existential assumptions' with which Quine famously attempted to saddle it. I argue, first, that the ontological issue is at best secondary: the crucial issue about second-order logic, at least for a neo-logicist, is epistemological. I then argue that neither Crispin Wright's attempt to characterize a `neutralist' conception of quantification that is wholly independent of existential commitment, nor Hale's attempt to characterize the second-order domain in terms of definability, can serve a neo-logicist's purposes. The problem, in both cases, is similar: neither Wright nor Hale is sufficiently sensitive to the demands that impredicativity imposes. Finally, I defend my own earlier attempt to finesse this issue, in "A Logic for Frege's Theorem", from Hale's criticisms.

For the most part, the paper is not terribly technical, but there are some (what I think are) interesting applications of technical work on models of second-order arithmetic toward the end of section 3.

Wednesday, May 18, 2016

Amazing Reflection on Sexuality and Sexual Violence

On Feministing:
When I started having sex, disposability was the first thing on the menu. Fuck you, ignore you, make fun of you on Facebook. Even now, it is the public penance exacted from women who dare.
A friend of mine said as much at the end of our first semester of college. ...“Boys aren’t going to want to date you if you keep having sex with them,” my friend said. The words smashed against my face like ice or glass.
And that's just the part about sexuality.

Tuesday, April 26, 2016

Every Woman Has Been a Little Bit Raped

Terrific piece on Role Reboot about why we (as a culture) need to broaden our understanding of rape and sexual assault. See also this piece on Bustle and this follow-up piece.

One of the most striking things to me was the idea, apparently expressed as often by women as by men, that stopping in the middle of sex "robs a man of his orgasm". This is particularly odd given that what's being discussed here, for the most part, is stopping intercourse. There's no indication, for example, in the Bustle piece that the author wouldn't have been happy to continue having some other sort of sex. Of course, it's her right not to stop altogether, if that's what she wants to do, but, as I said, that's actually not what seems to be at issue in most of these stories. There are other ways a guy can have an orgasm, you know?

Sunday, April 3, 2016

Amicus Brief By 113 Female Attorneys About the Role of Abortion in Their Lives

This happened a while ago, but I just saw it today and read through the brief. It paints a fascinating picture of the importance of safe and legal abortion in the lives of American women.

There are interesting stories about this in Slate, in the Atlantic, and in Forward. There's an op-ed by one of the women in the Washington Post, too.

But maybe the most powerful thing I've read on this topic is this series of stories, collected by the Atlantic. Some of them are just heartbreaking. All of them speak to just how intensely personal the decision to abort is. Perhaps what is most inspiring is what the stories say about ordinary people's ability to navigate the ethical complexities that such decisions involve.