core/tree.pyo in opener-constituent-parser-nl-0.1.1 vs core/tree.pyo in opener-constituent-parser-nl-1.0.0

- old
+ new

@@ -1,37 +1,37 @@  - Sc @s5ddlZddlZdefdYZdefdYZdefdYZdefd YZd +c;sSc @s5ddlZddlZdefdYZdefdYZdefdYZdefd YZd efd YZd eefd YZdeefdYZ dZ dZ dZ dZ ddddddddd d dg Zedkr1ddlZejdejndS(iNtTreecBseZd/dZdZdZdZdZdZdZ dZ dZ d Z d Z d Zd Zd ZdZdZdZddZd/dZdZdZdZdZdd/ddddZeddddZeeddZed Z ed!Z!d"Z"d/d#Z#ed$d/d/d/d/ed%Z$ed&Z%d'Z&d(Z'd)Z(d*dd+d$ed,Z)d-Z*d.Z+RS(0cCs|dkrkt|ts7tdt|jnt|j|}tj|||j |_ nDt|trtdt|jntj||||_ dS(Ns;%s: Expected a node value and child list or a single strings.%s() argument 2 should be a list, not a string( tNonet isinstancet -basestringt TypeErrorttypet__name__tparsetlistt__init__tnode(tselft node_or_strtchildrenttree((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR Zs cCs5t|tstS|j|jko4tj||S(N(RRtFalseR -Rt__eq__(R tother((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRmscCs ||k S(N((R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__ne__pscCs5t|tstS|j|jkp4tj||S(N(RRRR -Rt__lt__(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRrscCs5t|tstS|j|jkp4tj||S(N(RRRR -Rt__le__(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRuscCs5t|tstS|j|jkp4tj||S(N(RRtTrueR -Rt__gt__(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRxscCs5t|tstS|j|jkp4tj||S(N(RRRR -Rt__ge__(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR{scCstddS(Ns$Tree does not support multiplication(R(R tv((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__mul__scCstddS(Ns$Tree does not support multiplication(R(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__rmul__scCstddS(NsTree does not support addition(R(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__add__scCstddS(NsTree does not support addition(R(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__radd__scCst|ttfr%tj||St|ttfrt|dkrP|St|dkrn||dS||d|dSn(tdt|j t|j fdS(Niis#%s indices must be integers, not %s( -RtinttsliceRt __getitem__ttupletlenRRR(R tindex((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs cCst|ttfr(tj|||St|ttfrt|dkr^tdqt|dkr|||d<q|||d|d<n(tdt |j +basestringt TypeErrorttypet__name__tparsetlistt__init__tnode(tselft node_or_strtchildrenttree((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR Zs cCs5t|tstS|j|jko4tj||S(N(RRtFalseR +Rt__eq__(R tother((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRmscCs ||k S(N((R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__ne__pscCs5t|tstS|j|jkp4tj||S(N(RRRR +Rt__lt__(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRrscCs5t|tstS|j|jkp4tj||S(N(RRRR +Rt__le__(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRuscCs5t|tstS|j|jkp4tj||S(N(RRtTrueR +Rt__gt__(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRxscCs5t|tstS|j|jkp4tj||S(N(RRRR +Rt__ge__(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR{scCstddS(Ns$Tree does not support multiplication(R(R tv((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__mul__scCstddS(Ns$Tree does not support multiplication(R(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__rmul__scCstddS(NsTree does not support addition(R(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__add__scCstddS(NsTree does not support addition(R(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__radd__scCst|ttfr%tj||St|ttfrt|dkrP|St|dkrn||dS||d|dSn(tdt|j t|j fdS(Niis#%s indices must be integers, not %s( +RtinttsliceRt __getitem__ttupletlenRRR(R tindex((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs cCst|ttfr(tj|||St|ttfrt|dkr^tdqt|dkr|||d<q|||d|d<n(tdt |j t |j fdS(Nis,The tree position () may not be assigned to.is#%s indices must be integers, not %s( RRRRt __setitem__R R!t -IndexErrorRRR(R R"tvalue((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR#scCst|ttfr%tj||St|ttfrt|dkr[tdqt|dkr{||d=q||d|d=n(tdt |j +IndexErrorRRR(R R"tvalue((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR#scCst|ttfr%tj||St|ttfrt|dkr[tdqt|dkr{||d=q||d|d=n(tdt |j t |j -fdS(Nis(The tree position () may not be deleted.is#%s indices must be integers, not %s( RRRRt __delitem__R R!R$RRR(R R"((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR&scCsMg}x@|D]8}t|tr8|j|jq |j|q W|S(N(RRtextendtleavestappend(R R(tchild((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR(s  cCst|j|jS(N(RR -R((R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytflattens cCsUd}xD|D]<}t|tr:t||j}q t|d}q Wd|S(Nii(RRtmaxtheight(R tmax_child_heightR*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR-s  tpreordercsg}|dkr"|jdnxht|D]Z\}t|try|j|}|jfd|Dq/|jfq/W|dkr|jdn|S( NR/t bothorderc3s|]}f|VqdS(N((t.0tp(ti(sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pys <genexpr>st postorder(R/R0((R4R0((R)t enumerateRRt treepositionsR'(R tordert positionsR*tchildpos((R3sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR6s    ccsa| s||r|Vnx?|D]7}t|tr"x|j|D] }|VqGWq"q"WdS(N(RRtsubtrees(R tfilterR*tsubtree((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR:s  cCsvt|jtstdntt|jt|g}x0|D](}t|trF||j7}qFqFW|S(NsPProductions can only be generated from trees having node labels that are strings( RR +fdS(Nis(The tree position () may not be deleted.is#%s indices must be integers, not %s( RRRRt __delitem__R R!R$RRR(R R"((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR&scCsMg}x@|D]8}t|tr8|j|jq |j|q W|S(N(RRtextendtleavestappend(R R(tchild((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR(s  cCst|j|jS(N(RR +R((R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytflattens cCsUd}xD|D]<}t|tr:t||j}q t|d}q Wd|S(Nii(RRtmaxtheight(R tmax_child_heightR*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR-s  tpreordercsg}|dkr"|jdnxht|D]Z\}t|try|j|}|jfd|Dq/|jfq/W|dkr|jdn|S( NR/t bothorderc3s|]}f|VqdS(N((t.0tp(ti(sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pys <genexpr>st postorder(R/R0((R4R0((R)t enumerateRRt treepositionsR'(R tordert positionsR*tchildpos((R3sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR6s    ccsa| s||r|Vnx?|D]7}t|tr"x|j|D] }|VqGWq"q"WdS(N(RRtsubtrees(R tfilterR*tsubtree((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR:s  cCsvt|jtstdntt|jt|g}x0|D](}t|trF||j7}qFqFW|S(NsPProductions can only be generated from trees having node labels that are strings( RR RRt -Productiont Nonterminalt _child_namesRt productions(R tprodsR*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR@-s ! cCsVg}xI|D]A}t|tr8|j|jq |j||jfq W|S(N(RRR'tposR)R -(R RBR*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRBDs  cCs|dkrtdn|dfg}x|r|j\}}t|tsq|dkrd|S|d8}q-xBtt|dddD]$}|j||||ffqWq-WtddS(Nisindex must be non-negativeiis-index must be less than or equal to len(self)((R$tpopRRtrangeR!R)(R R"tstackR%ttreeposR3((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytleaf_treepositionXs    #&cCs||krtdn|j|}|j|d}xHtt|D]4}|t|ks|||||krP|| SqPW|S(Nsend must be greater than starti(t -ValueErrorRGRDR!(R tstarttendt start_treepost end_treeposR3((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyttreeposition_spanning_leavesos & trightit|t^cCs-ddlm}|||||||dS(Ni(tchomsky_normal_form(ttreetransformsRQ(R tfactort +Productiont Nonterminalt _child_namesRt productions(R tprodsR*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR@-s ! cCsVg}xI|D]A}t|tr8|j|jq |j||jfq W|S(N(RRR'tposR)R +(R RBR*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRBDs  cCs|dkrtdn|dfg}x|r|j\}}t|tsq|dkrd|S|d8}q-xBtt|dddD]$}|j||||ffqWq-WtddS(Nisindex must be non-negativeiis-index must be less than or equal to len(self)((R$tpopRRtrangeR!R)(R R"tstackR%ttreeposR3((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytleaf_treepositionXs    #&cCs||krtdn|j|}|j|d}xHtt|D]4}|t|ks|||||krP|| SqPW|S(Nsend must be greater than starti(t +ValueErrorRGRDR!(R tstarttendt start_treepost end_treeposR3((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyttreeposition_spanning_leavesos & trightit|t^cCs-ddlm}|||||||dS(Ni(tchomsky_normal_form(ttreetransformsRQ(R tfactort horzMarkovt vertMarkovt childChart -parentCharRQ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRQst+cCs*ddlm}||||||dS(Ni(tun_chomsky_normal_form(RRRY(R t expandUnaryRVRWt unaryCharRY((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRYscCs'ddlm}|||||dS(Ni(tcollapse_unary(RRR\(R t collapsePOSt collapseRoottjoinCharR\((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR\scCsIt|trAg|D]}|j|^q}||j|S|SdS(N(RRtconvertR -(tclsRR*R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR`s +parentCharRQ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRQst+cCs*ddlm}||||||dS(Ni(tun_chomsky_normal_form(RRRY(R t expandUnaryRVRWt unaryCharRY((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRYscCs'ddlm}|||||dS(Ni(tcollapse_unary(RRR\(R t collapsePOSt collapseRoottjoinCharR\((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR\scCsIt|trAg|D]}|j|^q}||j|S|SdS(N(RRtconvertR +(tclsRR*R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR`s "cCs3|st||j|St|j|SdS(N(RR -R`(R tdeep((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytcopyscCstS(N(t ImmutableTree(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt _frozen_classscCs|j}|dkr*|j|}nO|jdt}x+|jdD]}|||||<qLW|j|}t||S(NRbR((ReRR`RcRR6thash(R t leaf_freezert frozen_classtnewcopyRB((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytfreezes   +R`(R tdeep((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytcopyscCstS(N(t ImmutableTree(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt _frozen_classscCs|j}|dkr*|j|}nO|jdt}x+|jdD]}|||||<qLW|j|}t||S(NRbR((ReRR`RcRR6thash(R t leaf_freezert frozen_classtnewcopyRB((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytfreezes   s()cCs3t|t s"t|dkr1tdntjd|rRtdn|\}} tj|tj| } } |dkrd| | f}n|dkrd| | f}ntjd| || |f} dgfg} x| j |D]}|j @@ -40,55 +40,55 @@ dj |qWt| dkr|j |d | n0t| dddkr|j |d |n| ddd}|r/|jd kr/t|dkr/|d}n|S( Nis"brackets must be a length-2 strings\sswhitespace brackets not alloweds [^\s%s%s]+s%s\s*(%s)?|%s|(%s)iis end-of-stringit(RRR!RtretsearchtescapeRtcompiletfinditertgroupt _parse_errortlstripR)RCR (Ratstbracketst parse_nodet parse_leaft node_patternt leaf_patterntremove_empty_top_bracketingtopen_btclose_bt open_patternt close_patternttoken_reREtmatchttokenR -R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRsT5"     ,  ! ' cCs|dkr"t|d}}n|j|j}}d|j||d |f}|jddjdd}|}t||dkr||d d}n|dkrd||d}d }n|d +R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRsT5"     ,  ! ' cCs|dkr"t|d}}n|j|j}}d|j||d |f}|jddjdd}|}t||dkr||d d}n|dkrd||d}d }n|d d|dd |f7}t|dS(Ns end-of-strings1%s.parse(): expected %r but got %r %sat index %d.t i s s i s...i s %s"%s" -%s^iis s (R!RIRqRtreplaceRH(RaRtRt expectingRBRtmsgtoffset((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRrcs   cCsddlm}||dS(Ni(t -draw_trees(tnltk.draw.treeR(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytdrawscCs6djd|D}dt|j|j|fS(Ns, css|]}t|VqdS(N(trepr(R1tc((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pys <genexpr>ss %s(%r, [%s])(tjoinRRR -(R tchildstr((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__repr__scCs -|jS(N(tpprint(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__str__siFRkc Csd|j|||}t|||kr/|St|jtr^d|d|j|f}nd|d|j|f}x|D]}t|tr|dd|d|j||d|||7}qt|tr|dd|ddj|7}qt|tr6| r6|dd|dd|7}q|dd|dd |7}qW||d +%s^iis s (R!RIRqRtreplaceRH(RaRtRt expectingRBRtmsgtoffset((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRrcs   cCsddlm}||dS(Ni(t +draw_trees(tnltk.draw.treeR(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytdrawscCs6djd|D}dt|j|j|fS(Ns, css|]}t|VqdS(N(trepr(R1tc((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pys <genexpr>ss %s(%r, [%s])(tjoinRRR +(R tchildstr((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__repr__scCs +|jS(N(tpprint(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__str__siFRkc Csd|j|||}t|||kr/|St|jtr^d|d|j|f}nd|d|j|f}x|D]}t|tr|dd|d|j||d|||7}qt|tr|dd|ddj|7}qt|tr6| r6|dd|dd|7}q|dd|dd |7}qW||d S( Ns%s%s%sis%s%r%ss Rit/s%ss%ri( t _pprint_flatR!RR -RRRR R(R tmargintindenttnodeseptparenstquotesRtR*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs  "&!"c Cs d|jdddddd S( -Ns\Tree RiRRkRs[.s ](s[.s ](R(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytpprint_latex_qtreescCsg}x|D]}t|trA|j|j|||q t|tri|jdj|q t|tr| r|jd|q |jd|q Wt|jtrd|d|j|tj||dfSd|d|j|tj||dfSdS(NRs%ss%rs %s%s%s %s%siis %s%r%s %s%s( RRR)RR RRR -tstring(R RRRt childstrsR*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs N(,Rt -__module__RR RRRRRRRRRRRR#R&R(R+R-R6R:R@RBRGRMRQRRYRR\t classmethodR`RcReRjRRrRRRRRR(((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRsR@                           k   % RdcBseZddZdZdZdZdZdZdZ dZ +RRRR R(R tmargintindenttnodeseptparenstquotesRtR*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs  "&!"c Cs d|jdddddd S( +Ns\Tree RiRRkRs[.s ](s[.s ](R(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytpprint_latex_qtreescCsg}x|D]}t|trA|j|j|||q t|tri|jdj|q t|tr| r|jd|q |jd|q Wt|jtrd|d|j|tj||dfSd|d|j|tj||dfSdS(NRs%ss%rs %s%s%s %s%siis %s%r%s %s%s( RRR)RR RRR +tstring(R RRRt childstrsR*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs N(,Rt +__module__RR RRRRRRRRRRRR#R&R(R+R-R6R:R@RBRGRMRQRRYRR\t classmethodR`RcReRjRRrRRRRRR(((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRsR@                           k   % RdcBseZddZdZdZdZdZdZdZ dZ dZ dd Z d Z d Zd Zd ZdZdZeeeZRS(cCsrtt|j||y"t|jt|f|_Wn0ttfk rmtdt |j nXdS(Ns-%s: node value and children must be immutable( tsuperRdR RfR -R t_hashRRHRR(R R R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR s "cCstdt|jdS(Ns%s may not be modified(RHRR(R R"R%((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR#scCstdt|jdS(Ns%s may not be modified(RHRR(R R3tjR%((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt __setslice__scCstdt|jdS(Ns%s may not be modified(RHRR(R R"((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR&scCstdt|jdS(Ns%s may not be modified(RHRR(R R3R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt __delslice__scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__iadd__scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__imul__scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR)scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR'scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRCscCstdt|jdS(Ns%s may not be modified(RHRR(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytremovescCstdt|jdS(Ns%s may not be modified(RHRR(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytreversescCstdt|jdS(Ns%s may not be modified(RHRR(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytsortscCs|jS(N(R(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt__hash__scCs|jS(N(t_node(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt _get_nodescCs8t|dr+tdt|jn||_dS(NR -s%s may not be modified(thasattrRHRRR(R R%((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt _set_nodesN(RRRR R#RR&RRRR)R'RCRRRRRRtpropertyR -(((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRds" +R t_hashRRHRR(R R R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR s "cCstdt|jdS(Ns%s may not be modified(RHRR(R R"R%((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR#scCstdt|jdS(Ns%s may not be modified(RHRR(R R3tjR%((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt __setslice__scCstdt|jdS(Ns%s may not be modified(RHRR(R R"((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR&scCstdt|jdS(Ns%s may not be modified(RHRR(R R3R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt __delslice__scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__iadd__scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__imul__scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR)scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR'scCstdt|jdS(Ns%s may not be modified(RHRR(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRCscCstdt|jdS(Ns%s may not be modified(RHRR(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytremovescCstdt|jdS(Ns%s may not be modified(RHRR(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytreversescCstdt|jdS(Ns%s may not be modified(RHRR(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytsortscCs|jS(N(R(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt__hash__scCs|jS(N(t_node(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt _get_nodescCs8t|dr+tdt|jn||_dS(NR +s%s may not be modified(thasattrRHRRR(R R%((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt _set_nodesN(RRRR R#RR&RRRR)R'RCRRRRRRtpropertyR +(((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRds"               tAbstractParentedTreecBseZddZedZdZdZdZdZ dZ dZ dd Z d Z eed rd Zd ZdZnRS(cCstt|j|||dk rxBt|D]4\}}t|tr2|j||dtq2q2Wx?t|D].\}}t|trw|j||qwqwWndS(Ntdry_run( RRR RR5RRt -_setparentR(R R R R3R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR ,s cCs tdS(N(tNotImplementedError(R R*R"R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR?scCs tdS(N(R(R R*R"((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt +_setparentR(R R R R3R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR ,s cCs tdS(N(tNotImplementedError(R R*R"R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR?scCs tdS(N(R(R R*R"((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt _delparentUs cCst|trt||dt\}}}xDt|||D]0}t||tr@|j|||q@q@Wtt|j |n t|t r|dkr|t |7}n|dkrt dnt||tr|j|||ntt|j |nt|t tfrt |dkrOt dqt |dkro||d=q||d|d=n(tdt|jt|jfdS(Nt -allow_stepisindex out of ranges(The tree position () may not be deleted.is#%s indices must be integers, not %s(RRt slice_boundsRtxrangeRRRRR&RR!R$RR RRR(R R"RItstoptstepR3((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR&is,  cCst|trHt||dt\}}}t|ttfsQt|}nxJt|D]<\}}t|tr^|j||||dtq^q^WxDt |||D]0}t||tr|j +allow_stepisindex out of ranges(The tree position () may not be deleted.is#%s indices must be integers, not %s(RRt slice_boundsRtxrangeRRRRR&RR!R$RR RRR(R R"RItstoptstepR3((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR&is,  cCst|trHt||dt\}}}t|ttfsQt|}nxJt|D]<\}}t|tr^|j||||dtq^q^WxDt |||D]0}t||tr|j |||qqWxDt|D]6\}}t|tr|j||||qqWt t |j ||n_t|tr |dkrv|t|7}n|dkrtdn|||krdSt|tr|j||nt||tr|j -|||nt t |j ||nt|ttfrt|dkrCtdqt|dkrf|||d<q|||d|d<n(tdt|jt|jfdS(NRRisindex out of ranges,The tree position () may not be assigned to.is#%s indices must be integers, not %s(RRRRRR R5RRRRRRR#RR!R$RRR(R R"R%RIRRR3R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR#sD%  cCsBt|tr(|j|t|ntt|j|dS(N(RRRR!RRR)(R R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR)scCsSxL|D]D}t|tr5|j|t|ntt|j|qWdS(N(RRRR!RRR)(R R R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR's cCss|dkr|t|7}n|dkr4d}nt|trV|j||ntt|j||dS(Ni(R!RRRRRtinsert(R R"R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs  icCsz|dkr|t|7}n|dkr:tdnt||trd|j|||ntt|j|S(Nisindex out of range(R!R$RRRRRRC(R R"((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRCs  cCsS|j|}t||tr9|j|||ntt|j|dS(N(R"RRRRRR(R R*R"((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRst __getslice__cCs(|jttd|td|S(Ni(RRR,(R RIR((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRscCs(|jttd|td|S(Ni(R&RR,(R RIR((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRscCs+|jttd|td||S(Ni(R#RR,(R RIRR%((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRsN(RRRR RRRR&R#R)R'RRCRRRRRR(((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs    $ 8     t ParentedTreecBsheZd +|||nt t |j ||nt|ttfrt|dkrCtdqt|dkrf|||d<q|||d|d<n(tdt|jt|jfdS(NRRisindex out of ranges,The tree position () may not be assigned to.is#%s indices must be integers, not %s(RRRRRR R5RRRRRRR#RR!R$RRR(R R"R%RIRRR3R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR#sD%  cCsBt|tr(|j|t|ntt|j|dS(N(RRRR!RRR)(R R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR)scCsSxL|D]D}t|tr5|j|t|ntt|j|qWdS(N(RRRR!RRR)(R R R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR's cCss|dkr|t|7}n|dkr4d}nt|trV|j||ntt|j||dS(Ni(R!RRRRRtinsert(R R"R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs  icCsz|dkr|t|7}n|dkr:tdnt||trd|j|||ntt|j|S(Nisindex out of range(R!R$RRRRRRC(R R"((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRCs  cCsS|j|}t||tr9|j|||ntt|j|dS(N(R"RRRRRR(R R*R"((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRst __getslice__cCs(|jttd|td|S(Ni(RRR,(R RIR((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRscCs(|jttd|td|S(Ni(R&RR,(R RIR((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRscCs+|jttd|td||S(Ni(R#RR,(R RIRR%((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRsN(RRRR RRRR&R#R)R'RRCRRRRRR(((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs    $ 8     t ParentedTreecBsheZd dZdZdZdZdZdZdZ dZ -dZ e d Z RS( cCs}d|_tt|j|||dkryxHt|D]7\}}t|tr;d|_|j||q;q;WndS(N( Rt_parentRRR R5RRR(R R R R3R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR s   cCstS(N(tImmutableParentedTree(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRescCs|jS(N(R(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytparentscCsG|jdkrdSx-t|jD]\}}||kr#|Sq#WdS(N(RRR5(R R3R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt parent_index!s  cCs4|j}|jr0|dkr0|j|dSdS(Nii(RRR(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt left_sibling.s cCsA|j}|jr=|t|jdkr=|j|dSdS(Ni(RRR!R(R R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt right_sibling5s "cCs/|}x"|jdk r*|j}q W|S(N(RR(R troot((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR<scCs7|jdkrdS|jj|jfSdS(N((RRt treepositionR(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRGscCs d|_dS(N(RR(R R*R"((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRTscCsVt|ts"tddn|jdk r@tdn|sR||_ndS(Ns"Can not insert a non-ParentedTree sinto a ParentedTrees3Can not insert a subtree that already has a parent.(RRRRRRH(R R*R"R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR]s N(RRRR ReRRRRRRRRR(((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs      tMultiParentedTreecBszeZd dZdZdZdZdZdZdZ dZ +dZ e d Z RS( cCs}d|_tt|j|||dkryxHt|D]7\}}t|tr;d|_|j||q;q;WndS(N( Rt_parentRRR R5RRR(R R R R3R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR s   cCstS(N(tImmutableParentedTree(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRescCs|jS(N(R(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytparentscCsG|jdkrdSx-t|jD]\}}||kr#|Sq#WdS(N(RRR5(R R3R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt parent_index!s  cCs4|j}|jr0|dkr0|j|dSdS(Nii(RRR(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt left_sibling.s cCsA|j}|jr=|t|jdkr=|j|dSdS(Ni(RRR!R(R R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt right_sibling5s "cCs/|}x"|jdk r*|j}q W|S(N(RR(R troot((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR<scCs7|jdkrdS|jj|jfSdS(N((RRt treepositionR(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRGscCs d|_dS(N(RR(R R*R"((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRTscCsVt|ts"tddn|jdk r@tdn|sR||_ndS(Ns"Can not insert a non-ParentedTree sinto a ParentedTrees3Can not insert a subtree that already has a parent.(RRRRRRH(R R*R"R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR]s N(RRRR ReRRRRRRRRR(((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs      tMultiParentedTreecBszeZd dZdZdZdZdZdZdZ dZ dZ d Z d -Z ed ZRS( cCs}g|_tt|j|||dkryxHt|D]7\}}t|tr;g|_|j||q;q;WndS(N( t_parentsRRR RR5RRR(R R R R3R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR ~s   cCstS(N(tImmutableMultiParentedTree(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRescCs t|jS(N(RR(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytparentss cCs7g|jD]&\}}|dkr ||d^q S(Nii(t_get_parent_indices(R RR"((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt left_siblingss -cCsAg|jD]0\}}|t|dkr ||d^q S(Ni(RR!(R RR"((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytright_siblingss +Z ed ZRS( cCs}g|_tt|j|||dkryxHt|D]7\}}t|tr;g|_|j||q;q;WndS(N( t_parentsRRR RR5RRR(R R R R3R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR ~s   cCstS(N(tImmutableMultiParentedTree(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRescCs t|jS(N(RR(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytparentss cCs7g|jD]&\}}|dkr ||d^q S(Nii(t_get_parent_indices(R RR"((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt left_siblingss +cCsAg|jD]0\}}|t|dkr ||d^q S(Ni(RR!(R RR"((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytright_siblingss cCsEg|jD]7}t|D]$\}}||kr||f^qq -S(N(RR5(R RR"R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs cCs|jijS(N(t_get_roots_helpertvalues(R ((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytrootsscCsA|jr-x1|jD]}|j|qWn||t|<|S(N(RRtid(R tresultR((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs - cCsF||jkrgSgt|D]\}}||kr |^q SdS(N(RR5(R RR"R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytparent_indicess -cCss||krdgSg|jD]N}|j|D]8}t|D]%\}}||kr@||f^q@q0qSdS(N((RR6R5(R RRRFR"R*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR6s  cCsMxFt|D](\}}||kr ||kr Pq q W|jj|dS(N(R5RR(R R*R"R3R((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRscCsct|ts"tddn|s_x4|jD]}||kr2Pq2q2W|jj|ndS(Ns'Can not insert a non-MultiParentedTree sinto a MultiParentedTree(RRRRR)(R R*R"RR((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRs  N(RRRR ReRRRRRRRR6RRR(((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRms      -    RcBseZRS((RR(((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRsRcBseZRS((RR(((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyRscCsPg}xC|D];}t|tr;|jt|jq |j|q W|S(N(RRR)R>R -(RtnamesR*((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyR?s  cCstddS(Ns<Use Tree.parse(s, remove_empty_top_bracketing=True) instead.(t NameError(Rt((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt bracket_parse%scCstjd|}xtt|D]}||dkrc||||d||d<||<q%d||kr||jd}t|dkr|d||<qd|dd|dd ||<q%||d -kr%d ||<q%q%Wtj|}tj|d tS( Ns([()| ])t(it:iiRit)RORkRz( RltsplitRDR!RRRRR(RtttokensR3tfieldsttreebank_string((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt sinica_parse+s (%cCs|ddlm}d}t|}dGH|GH|jGHdGH|jGH|dGH|dGH|jGH|jGH|dGH|dGH|dGH|d}|jd|jjdd GH|GH|jjd +S(N(RR5(R RR"R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs cCs|jijS(N(t_get_roots_helpertvalues(R ((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytrootsscCsA|jr-x1|jD]}|j|qWn||t|<|S(N(RRtid(R tresultR((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs + cCsF||jkrgSgt|D]\}}||kr |^q SdS(N(RR5(R RR"R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytparent_indicess +cCss||krdgSg|jD]N}|j|D]8}t|D]%\}}||kr@||f^q@q0qSdS(N((RR6R5(R RRRFR"R*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR6s  cCsMxFt|D](\}}||kr ||kr Pq q W|jj|dS(N(R5RR(R R*R"R3R((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRscCsct|ts"tddn|s_x4|jD]}||kr2Pq2q2W|jj|ndS(Ns'Can not insert a non-MultiParentedTree sinto a MultiParentedTree(RRRRR)(R R*R"RR((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRs  N(RRRR ReRRRRRRRR6RRR(((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRms      +    RcBseZRS((RR(((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRsRcBseZRS((RR(((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyRscCsPg}xC|D];}t|tr;|jt|jq |j|q W|S(N(RRR)R>R +(RtnamesR*((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyR?s  cCstddS(Ns<Use Tree.parse(s, remove_empty_top_bracketing=True) instead.(t NameError(Rt((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt bracket_parse%scCstjd|}xtt|D]}||dkrc||||d||d<||<q%d||kr||jd}t|dkr|d||<qd|dd|dd ||<q%||d +kr%d ||<q%q%Wtj|}tj|d tS( Ns([()| ])t(it:iiRit)RORkRz( RltsplitRDR!RRRRR(RtttokensR3tfieldsttreebank_string((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt sinica_parse+s (%cCs|ddlm}d}t|}dGH|GH|jGHdGH|jGH|dGH|dGH|jGH|jGH|dGH|dGH|dGH|d}|jd|jjdd GH|GH|jjd |d<|GHHd GH|j |GHd GH|j |GHH|j d ddgdd}dGH|GHH|jj|j }dGH|GHHdGH|j GHHdGH|jGHHd|_|GHdS(Ni(RsA(S (NP (DT the) (NN cat)) (VP (VBD ate) (NP (DT a) (NN cookie))))s#Convert bracketed string into tree:sDisplay tree properties:iis(JJ big)sTree modification:s (NN cake)sCollapse unary:sChomsky normal form:txtytztprobg?sProbabilistic Tree:s0Convert tree to bracketed string and back again:s LaTeX output:sProduction output:ttesti(ii(iii(iii(stesti(tnltkRRRR -R-R(RRR\RQtProbabilisticTreeRRR@(RRttttthe_cattpt((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pytdemoOsZ          +R-R(RRR\RQtProbabilisticTreeRRR@(RRttttthe_cattpt((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pytdemoOsZ            -   tImmutableProbabilisticTreetProbabilisticMixInRRRt__main__t optionflags(RlRRRRdRRRRRR?RRRt__all__RtdoctestttestmodtNORMALIZE_WHITESPACE(((sB/Users/johnmelidis/Sites/opener/constituent-parser-nl/core/tree.pyt<module>s*  8u  $ G       +   tImmutableProbabilisticTreetProbabilisticMixInRRRt__main__t optionflags(RlRRRRdRRRRRR?RRRt__all__RtdoctestttestmodtNORMALIZE_WHITESPACE(((sN/home/yorickpeterse/Private/Projects/opener/constituent-parser-nl/core/tree.pyt<module>s*  8u  $ G       \ No newline at end of file