I need to represent sentences in RDF format.
In other words \"John likes coke\" would be automatically represented as:
Subject : John
Predicate : L
It looks like you want the typed dependencies of a sentence, e.g. for John likes coke
:
nsubj(likes-2, John-1)
dobj(likes-2, coke-3)
I'm not aware of any dependency parser that directly produces RDF. However, many of them produce parses in a standardized tab limited representation known as CoNLL-X, and it shouldn't be too hard to convert from CoNLL-X to RDF.
Open Source Dependency parsers
There are a number of parsers to choose from that extract typed dependencies, including the following state-of-art open source options:
The Stanford Parser includes a pre-trained model for parsing English. To get typed dependencies you'll need to use the flag -outputFormat typedDependencies
.
For the MaltParser you can download an English model here.
The MSTParser includes a small 200 sentence English training set that you can use to create you're own English parsing model. However, training on this little data will hurt the accuracy of the resulting parser. So, if you decide to use this parser, you are probably better off using the pretrain model available here.
All of the pretrained models linked above produce parses according to the Stanford Dependency formalism (ACL paper, and manual).
Of these three, the Stanford Parser is the most accurate. The MaltParser is the fastest, with some configurations of this package being able to parse 1800 sentences in only 8 seconds.