human
Schema:
venue (venueId, venueName)
author (authorId, authorName)
dataset (datasetId, datasetName)
journal (journalId, journalName)
keyphrase (keyphraseId, keyphraseName)
paper (paperId, title, venueId, year, numCiting, numCitedBy, journalId)
cite (citingPaperId, citedPaperId)
paperDataset (paperId, datasetId)
paperKeyphrase (paperId, keyphraseId)
writes (paperId, authorId)
Please answer with SQL.
assistant
Sure, I understand.
human
keyphrases used by dan klein in his emnlp papers
assistant
SELECT DISTINCT t2.keyphraseid FROM paper AS t3 JOIN paperkeyphrase AS t2 ON t3.paperid = t2.paperid JOIN venue AS t4 ON t4.venueid = t3.venueid JOIN writes AS t5 ON t5.paperid = t3.paperid JOIN author AS t1 ON t5.authorid = t1.authorid WHERE t1.authorname = 'dan klein' AND t4.venuename = 'emnlp';
human
what are some syntactic parsing papers that chris dyer did not write ?
assistant
SELECT DISTINCT t1.authorname , t3.paperid FROM paperkeyphrase AS t2 JOIN keyphrase AS t5 ON t2.keyphraseid = t5.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN writes AS t4 ON t4.paperid = t3.paperid JOIN author AS t1 ON t4.authorid = t1.authorid WHERE t1.authorname != 'chris dyer' AND t5.keyphrasename = 'syntactic parsing';
human
who has written the most syntactic parsing papers ?
assistant
SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'syntactic parsing' GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
human
most cited papers on parsing
assistant
SELECT DISTINCT t4.citedpaperid , COUNT ( t4.citedpaperid ) FROM paperkeyphrase AS t2 JOIN keyphrase AS t1 ON t2.keyphraseid = t1.keyphraseid JOIN paper AS t3 ON t3.paperid = t2.paperid JOIN cite AS t4 ON t3.paperid = t4.citedpaperid WHERE t1.keyphrasename = 'parsing' GROUP BY t4.citedpaperid ORDER BY COUNT ( t4.citedpaperid ) DESC;
human
who has the most papers in semantic parsing after 2005 ?
assistant
SELECT DISTINCT COUNT ( t4.paperid ) , t3.authorid FROM paperkeyphrase AS t1 JOIN keyphrase AS t2 ON t1.keyphraseid = t2.keyphraseid JOIN paper AS t4 ON t4.paperid = t1.paperid JOIN writes AS t3 ON t3.paperid = t4.paperid WHERE t2.keyphrasename = 'semantic parsing' AND t4.year > 2005 GROUP BY t3.authorid ORDER BY COUNT ( t4.paperid ) DESC;
human
How many papers by Ed Desmond contain the keyphrases Semantic Parsing ?
assistant
SELECT DISTINCT COUNT( DISTINCT t3.paperid ) FROM paperkeyphrase AS t1 JOIN keyphrase AS t4 ON t1.keyphraseid = t4.keyphraseid JOIN writes AS t3 ON t3.paperid = t1.paperid JOIN author AS t2 ON t3.authorid = t2.authorid WHERE t2.authorname = "Ed Desmond" AND t4.keyphrasename = "Semantic Parsing" ;