Created
December 8, 2012 20:02
-
-
Save tetsuok/4241676 to your computer and use it in GitHub Desktop.
A French sentence aligned with an English parse tree.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *.pdf binary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % Figure from (Galley et al., 2004) | |
| \documentclass{standalone} | |
| \usepackage{tikz} | |
| \usepackage{tikz-qtree} | |
| \usepackage{xltxtra} | |
| % Works only for XeLaTeX | |
| \setmainfont[Mapping=tex-text,ItalicFont={Gill Sans Light}]{Gill Sans} | |
| \begin{document} | |
| \begin{tikzpicture}[level distance=25pt] | |
| \tikzset{every leaf node/.style={font=\it}} | |
| \begin{scope} | |
| \Tree [.S [.NP [.PRP \node (en-1) {he}; ] ] | |
| [.VP [.AUX \node (en-2) {does}; ] | |
| [.RB \node (en-3) {not}; ] | |
| [.VB \node (en-4) {go}; ] ] ] | |
| \end{scope} | |
| \begin{scope}[yshift=-4cm] | |
| \foreach \id/\w in {1/il, 2/ne, 3/va, 4/pas} { | |
| \node (fr-\id) at (\id-2,0) {\it \w}; | |
| } | |
| \end{scope} | |
| \begin{scope}[thick, dashed, draw=blue] | |
| \draw (en-1) -- (fr-1); | |
| \draw (en-3) -- (fr-2); | |
| \draw (en-3) -- (fr-4); | |
| \draw (en-4) -- (fr-3); | |
| \end{scope} | |
| \end{tikzpicture} | |
| \end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment