Created
June 23, 2012 20:18
-
-
Save tetsuok/2979810 to your computer and use it in GitHub Desktop.
An example of English-Japanese pair with human-annotated parse trees and word alignments
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
| % Note: works only for XeLaTeX and tikz-qtree 1.2. | |
| \documentclass{beamer} | |
| \usepackage{tikz} | |
| \usepackage{tikz-qtree} | |
| \setbeamertemplate{navigation symbols}{} %no nav symbols | |
| \usepackage{zxjatype} | |
| \setjamainfont[Scale=0.8]{Hiragino Kaku Gothic Pro W3} | |
| \setmainfont[Mapping=tex-text,Scale=MatchLowercase]{Helvetica} % \sffamily | |
| \setsansfont[Scale=MatchLowercase]{Helvetica} % \sffamily のフォント | |
| \usepackage{xltxtra} | |
| \begin{document} | |
| \begin{frame} | |
| \begin{center} | |
| \begin{tikzpicture} | |
| \begin{scope}[xshift=1cm] | |
| \tikzset{frontier/.style={distance from root=4.2cm}} | |
| \Tree [.S [.NP [.PRP \node (e1) {she}; ]] | |
| [.VP [.VBD \node (e2) {broke}; ] | |
| [.NP [.DT \node (e3) {the}; ] [.NN \node (e4) {school}; ] [.NNS \node (e5) {windows}; ] ] ] ] | |
| \end{scope} | |
| \begin{scope}[yshift=-6cm] | |
| \foreach \id/\w in {1/彼女, 2/は, 3/学校, 4/の, 5/窓ガラス, 6/を, 7/割った} { | |
| \node (ja\id) at (\id-1,0) {\w}; | |
| } | |
| \end{scope} | |
| \begin{scope}[dashed] | |
| \draw (e1) -- (ja1); | |
| \draw (e2) -- (ja7); | |
| \draw (e4) -- (ja3); | |
| \draw (e5) -- (ja5); | |
| \end{scope} | |
| \end{tikzpicture} | |
| \end{center} | |
| \end{frame} | |
| \end{document} | |
| %%% Local Variables: | |
| %%% mode: latex | |
| %%% TeX-master: t | |
| %%% End: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment