Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 8-3.cgel #51

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 111 additions & 1 deletion datasets/oneoff/8-3.cgel
Original file line number Diff line number Diff line change
@@ -1,4 +1,114 @@
# sent_id = 8-3
# text = Upon a timely request for a hearing under section 6996(b) of this title, an appellant shall have the right to have a hearing by the Division on the adverse decision within 45 days after the date of the receipt of the request for the hearing.
# sent = upon a timely request for a hearing under section 6996(b) of this title an appellant shall have the right to have a hearing by the division on the adverse decision within 45 days after the date of the receipt of the request for the hearing
# tree_by = mebwells (YYYY-MM-DD)
# tree_by = mebwells (2024-09-10)
(Clause
:Mod (PP
:Head (P :t "upon")
:Obj (NP
:Det (DP
:Head (D :t "a"))
:Head (Nom
:Mod (AdjP
:Head (Adj :t "timely"))
:Head (Nom
:Head (N :t "request")
:Mod (PP
:Head (P :t "for")
:Obj (NP
:Det (DP
:Head (D :t "a"))
:Head (Nom
:Head (N :t "hearing")
:Mod (PP
:Head (P :t "under" :note "[AMBIG] Does the PP refer to the request or to the hearing itself?")
:Obj (NP
:Head (Nom
:Mod (Nom
:Head (N :t "section"))
:Head (N :t "6996(b" :xpos "CD" :p ")"))
:Mod (PP
:Head (P :t "of")
:Obj (NP
:Det (DP
:Head (D :t "this"))
:Head (Nom
:Head (N :t "title" :p ",")))))))))))))
:Head (Clause
:Subj (NP
:Det (DP
:Head (D :t "an"))
:Head (Nom
:Head (N :t "appellant")))
:Head (VP
:Head (V_aux :t "shall" :xpos "MD")
:Comp (Clause
:Head (VP
:Head (V :t "have" :xpos "VB")
:Obj (NP
:Det (DP
:Head (D :t "the"))
:Head (Nom
:Head (N :t "right")
:Mod (Clause
:Head (VP
:Marker (Sdr :t "to")
:Head (VP
:Head (VP
:Head (V :t "have" :xpos "VB")
:Obj (NP
:Det (DP
:Head (D :t "a"))
:Head (Nom
:Head (N :t "hearing")
:Mod (PP
:Head (P :t "by")
:Obj (NP
:Det (DP
:Head (D :t "the"))
:Head (Nom
:Head (N :t "Division")
:Comp (PP
:Head (P :t "on")
:Obj (NP
:Det (DP
:Head (D :t "the"))
:Head (Nom
:Mod (AdjP
:Head (Adj :t "adverse"))
:Head (N :t "decision"))))))))))
:Mod (PP
:Head (P :t "within")
:Obj (NP
:Det (DP
:Head (D :t "45" :xpos "CD"))
:Head (Nom
:Head (N :t "days")
:Mod (PP
:Head (P :t "after")
:Obj (NP
:Det (DP
:Head (D :t "the"))
:Head (Nom
:Head (N :t "date")
:Comp (PP
:Head (P :t "of")
:Obj (NP
:Det (DP
:Head (D :t "the"))
:Head (Nom
:Head (N :t "receipt")
:Comp (PP
:Head (P :t "of")
:Obj (NP
:Det (DP
:Head (D :t "the"))
:Head (Nom
:Head (N :t "request")
:Mod (PP
:Head (P :t "for")
:Obj (NP
:Det (DP
:Head (D :t "the"))
:Head (Nom
:Head (N :t "hearing" :p "."))))))))))))))))))))))))))
Binary file added datasets/oneoff/pdf/8-3.pdf
Binary file not shown.
180 changes: 180 additions & 0 deletions datasets/oneoff/tex/8-3.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@

\documentclass[tikz,border=12pt]{standalone}
\usepackage[linguistics]{forest}
\usepackage{times}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{soul}
\usepackage[T1]{fontenc}
\usepackage{marvosym}

\definecolor{orange}{HTML}{FFCCFF}
\definecolor{ltyellow}{HTML}{FFFFAA}
\definecolor{cgelblue}{HTML}{009EE0}

% text highlight color
% https://tex.stackexchange.com/a/352959
\newcommand{\hlc}[2][yellow]{{%
\colorlet{foo}{#1}%
\sethlcolor{foo}\hl{#2}}%
}
\newcommand{\hlgreen}[2][green]{{%
\colorlet{foo}{#1}%
\sethlcolor{foo}\hl{#2}}%
}
\newcommand{\p}[1]{%
\sethlcolor{white}\color{gray}\hl{#1}%
}

\pagestyle{empty}
%----------------------------------------------------------------------
% Node labels in CGEL trees are defined with \Node,
% which is defined so that \Node{Abcd}{Xyz} yields
% a label with the function Abcd on the top, in small
% sanserif font, followed by a colon, and the category
% Xyz on the bottom.
\newcommand{\Node}[2]{\small\textsf{#1:}\\{#2}}
% For commonly used functions this is defined with \(function)
\newcommand{\Head}[1]{\Node{Head}{#1}}
\newcommand{\Subj}[1]{\Node{Subj}{#1}}
\newcommand{\Comp}[1]{\Node{Comp}{#1}}
\newcommand{\Mod}[1]{\Node{Mod}{#1}}
\newcommand{\Det}[1]{\Node{Det}{#1}}
\newcommand{\PredComp}[1]{\Node{PredComp}{#1}}
\newcommand{\Crd}[1]{\Node{Coordinate}{#1}}
\newcommand{\Mk}[1]{\Node{Marker}{#1}}
\newcommand{\Obj}[1]{\Node{Obj}{#1}}
\newcommand{\Sup}[1]{\Node{Supplement}{#1}}
\newcommand{\idx}[1]{\textsubscript{\fcolorbox{red}{white}{\textcolor{red}{#1}}}}
%----------------------------------------------------------------------
\begin{document}

% # sent_id = 8-3
% # text = Upon a timely request for a hearing under section 6996(b) of this title, an appellant shall have the right to have a hearing by the Division on the adverse decision within 45 days after the date of the receipt of the request for the hearing.
% # sent = upon a timely request for a hearing under section 6996(b) of this title an appellant shall have the right to have a hearing by the division on the adverse decision within 45 days after the date of the receipt of the request for the hearing
% # tree_by = mebwells (2024-09-10)

\begin{forest}
where n children=0{% for each terminal node
font=\sffamily,
fill=ltyellow,
%tier=word % align at the "word" tier (bottom)
}{% % no false conditions, so empty
},
[Clause
[\Node{Mod}{PP}
[\Node{Head}{P},edge={line width=1pt}[upon]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[a]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Mod}{AdjP}
[\Node{Head}{Adj},edge={line width=1pt}[timely]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[request]]
[\Node{Mod}{PP}
[\Node{Head}{P},edge={line width=1pt}[for]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[a]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[hearing]]
[\Node{Mod}{PP}
[\Node{Head}{P} \hlgreen{\Info},edge={line width=1pt}[under]]
[\Node{Obj}{NP}
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Mod}{Nom}
[\Node{Head}{N},edge={line width=1pt}[section]]]
[\Node{Head}{N},edge={line width=1pt}[6996(b,label={right:\p{)}}]]]
[\Node{Mod}{PP}
[\Node{Head}{P},edge={line width=1pt}[of]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[this]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[title,label={right:\p{{,}}}]]]]]]]]]]]]]]
[\Node{Head}{Clause},edge={line width=1pt}
[\Node{Subj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[an]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[appellant]]]]
[\Node{Head}{VP},edge={line width=1pt}
[\Node{Head}{V\textsubscript{aux}},edge={line width=1pt}[shall]]
[\Node{Comp}{Clause}
[\Node{Head}{VP},edge={line width=1pt}
[\Node{Head}{V},edge={line width=1pt}[have]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[the]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[right]]
[\Node{Mod}{Clause}
[\Node{Head}{VP},edge={line width=1pt}
[\Node{Marker}{Sdr}[to]]
[\Node{Head}{VP},edge={line width=1pt}
[\Node{Head}{VP},edge={line width=1pt}
[\Node{Head}{V},edge={line width=1pt}[have]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[a]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[hearing]]
[\Node{Mod}{PP}
[\Node{Head}{P},edge={line width=1pt}[by]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[the]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[Division]]
[\Node{Comp}{PP}
[\Node{Head}{P},edge={line width=1pt}[on]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[the]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Mod}{AdjP}
[\Node{Head}{Adj},edge={line width=1pt}[adverse]]]
[\Node{Head}{N},edge={line width=1pt}[decision]]]]]]]]]]]
[\Node{Mod}{PP}
[\Node{Head}{P},edge={line width=1pt}[within]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[45]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[days]]
[\Node{Mod}{PP}
[\Node{Head}{P},edge={line width=1pt}[after]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[the]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[date]]
[\Node{Comp}{PP}
[\Node{Head}{P},edge={line width=1pt}[of]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[the]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[receipt]]
[\Node{Comp}{PP}
[\Node{Head}{P},edge={line width=1pt}[of]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[the]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[request]]
[\Node{Mod}{PP}
[\Node{Head}{P},edge={line width=1pt}[for]]
[\Node{Obj}{NP}
[\Node{Det}{DP}
[\Node{Head}{D},edge={line width=1pt}[the]]]
[\Node{Head}{Nom},edge={line width=1pt}
[\Node{Head}{N},edge={line width=1pt}[hearing,label={right:\p{.}}]]]]]]]]]]]]]]]]]]]]]]]]]]]
\node at (current bounding box.south)[yshift=-1cm]{
(1) [AMBIG] Does the PP refer to the request or to the hearing itself?};
\end{forest}


\end{document}