Dependency trees with tikz-dependency

There is a package for drawing dependency trees in LaTeX called tikz-dependency:

\usepackage{tikz-dependency} % draw example with dependency tree

First the sentence is defined inside a deptext environment. You could add more rows to the sentence, e.g., for lemmas or parts-of-speech.
The edges between words are given with depedge commands (outside the deptext environment). Edges can in theory go both ways, but it looks better if they go from the head to the child. Here is an example dependency tree for a sentence:

\begin{dependency}
\begin{deptext}
It \& has \& a \& larger \& LCD \& than \& the \& T3i \& .\\
\end{deptext}
\deproot{3}{ROOT}
\depedge{2}{1}{NMOD}
\depedge{5}{3}{NMOD}
\depedge{5}{4}{NMOD}
\depedge{2}{5}{NMOD}
\depedge{5}{6}{PMOD}
\depedge{8}{7}{AMOD}
\depedge{6}{8}{PRD}
\end{dependency}

Besides drawing dependency trees, the package is also useful to create nice mark-up for words and phrases. The command is wordgroup which is inserted at the same place as the dependency edges and works upon the elements of the deptext The following draws a red box around words 7 and 8 in the sentence above (the 1 stands for the row):

\wordgroup[group style={fill=red!30, draw=red}]{1}{7}{8}{a}

There are lots of styling options for nodes, edges and word groups. I use the following in my thesis (this defines a style that combines options for both the dependency and the deptext environment, I just use the same in both):

\depstyle{depex}{%
   edge style = {gray},
   group style={inner sep=.2ex},
   column sep=0.5em,
   edge unit distance=2ex,
   edge horizontal padding=0.5ex,
   row sep=0.2em,
   label style={draw=none,font=\scriptsize},
   edge vertical padding=0.4ex,
}

I want all mark-up of all word groups to be styled the same way, so I don’t want to write the part with fill and draw all the time with different colors. And if I want to change the percentage of white, I would like to do it at one place for all nodes. So I have written a macro that only expects the color to be given:

\tikzset{
   coloring of/.style={fill=#1!30, draw=#1},
}

And finally, for presentations with dependency trees I want to be able to use overlays, i.e., to show a word group at a specific time. For edges you can use the normal \visible command from beamer, but for word groups it does not work for some reason. So this is a macro that does work and shows word groups only on specific slides (I got this from LaTeX Stack Exchange):

\tikzset{
    invisible/.style={opacity=0},
    visible on/.style={alt={#1{}{invisible}}},
    alt/.code args={<#1>#2#3}{%
      \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}},
}

Finally, here an example of using the two macros:

\wordgroup[group style={coloring of=predicatecolor},visible on=<4->]{1}{2}{4}{pred}