Skip to content

Instantly share code, notes, and snippets.

@tetsuok
Last active December 16, 2015 06:29
Show Gist options
  • Select an option

  • Save tetsuok/5392234 to your computer and use it in GitHub Desktop.

Select an option

Save tetsuok/5392234 to your computer and use it in GitHub Desktop.
An example of ITG parse tree.
*.eps binary
*.pdf binary
*.ps binary
Display the source blob
Display the rendered blob
Raw
% Copyright (c) 2013, Tetsuo Kiso. All rights reserved.
\documentclass{standalone}
\RequirePackage{ifxetex}\RequireXeTeX
\usepackage{tikz}
\usepackage{tikz-qtree}
\usetikzlibrary{calc}
\usepackage{zxjatype}
% \setsansfont[Scale=MatchLowercase]{Helvetica} % \sffamily
\setmainfont{Times}
\setjamainfont[Scale=0.75]{Hiragino Kaku Gothic Pro W3}
% Assume you are compling this file on Mac OS X.
% \setjafamilyfont{chinesefam}{Hiragino Sans GB W3}
\setjafamilyfont{chinesefam}{Kaiti SC}
\newcommand*{\chinese}{%
\CJKfamily{chinesefam}%
\punctstyle{fullwidth}%
\zxuseoriginalparameters}
\begin{document}
\begin{tikzpicture}
\Tree [.S [.SP
[.NP The/$\epsilon$ Authority/{\chinese 管理局} ]
[.VP will/{\chinese 将会}
[.\node(VP){VP}; [.VV be/$\epsilon$ accountable/{\chinese 负责} ]
[.PP to/{\chinese 向}
[.NP the/$\epsilon$
[.NN financial/{\chinese 财政}
Secretary/{\chinese 司} ] ] ] ] ] ]
[../。 ] ]
\draw ($(VP.south west) - (4mm,2mm)$) -- ($(VP.south east) - (-4mm,2mm)$);
\end{tikzpicture}%
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment