There aren’t many tools which allow you to visualise sentences parsed with dependency grammars. Here’s a small tool which generates a PNG of the dependency graph of a given sentence using the Stanford Parser. You can generate the image for Einey’s quote below by following these steps.
- Click here to download dependensee-3.7.0.jar.
- Download the latest version of the Stanford Parser. I am using version 3.7.0.
- Place the jar file in the Stanford Parser folder.
- On the command prompt, run
java -cp dependensee-3.7.0.jar;stanford-parser.jar;stanford-parser-3.6.0-models.jar;slf4j-api.jar com.chaoticity.dependensee.Main "Example isn't another way to teach, it is the only way to teach." out.png
(If you are on *nix, replace the semicolon by a colon and make sure you have Arial installed. If you have an already parsed dependency output file, replace the sentence by
out.pngand admire 🙂
I have added Part-of-Speech tags and very basic edge overlap management and might add more eye candy later (curved/coloured edges ?). You can link the library in your code as well. An example is given below. Comments and queries are welcome. You can also find the source at github.