This is not a ready solution and perhaps not what you are looking for, but nevertheless:
Have a look at www.pubmed2ensembl.org, which links publications to genes and vice versa
Get BioMart 0.8rc7 at www.biomart.org and install it locally
Use MartConfigurator to import the pubmed2ensembl datasources as URI sources*
Use BioMart 0.8rc7's SPARQL endpoint to access pubmed2ensembl
The data stays on www.pubmed2ensembl.org. SPARQL queries to your local 0.8rc7 BioMart will automatically fetch the data from the remote source.
BioMart's SPARQL support is currently fairly limited, because it would otherwise not be possible to support SPARQL endpoints on the larger databases (s.a. Ensembl) on central.biomart.org or dcc.icgc.org plus we need to make sure that federation works too. Essentially, you can only query leaves of the ontology (Literals), but you cannot traverse the graph using SPARQL. Have a look at the auto-generated SPARQL queries and you will see what I mean (http://www.biomart.org/rc6_documentation.pdf -- rc6 docs == rc7 docs).
While this is not directly querying PubMed, pubmed2ensembl would at least give you a view on MEDLINE + PMC as seen through "gene glasses".
Joachim
*There is one quirk. If you are going to use this solution, then I can tell you how to enable importing the partitioned species data as it appears in pubmed2ensembl. There is one feature that you need to activate in the source-code of BioMart in order to seamlessly integrate all species-info from a 0.7 mart into a 0.8 mart, which is off by default because we had no time to test it for the release.
I just tested this, and it works fine! Thanx for the tip!