³ò
ŽB_Kc           @   s¯   d  Z  d d k l Z d d k l Z d d k Z d e f d „  ƒ  YZ d „  Z d „  Z	 e
 d	 „ Z d
 „  Z d „  Z d „  Z d Z d Z d Z e d j o e	 ƒ  n d S(   sÆ   
Tools for reading and writing dependency trees.
The input is assumed to be in U{Malt-TAB<http://w3.msi.vxu.se/~nivre/research/MaltXML.html>} format.

Currently only reads the first tree in a file.
iÿÿÿÿ(   t   Tree(   t   pformatNt   DependencyGraphc           B   sï   e  Z d  Z e d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 „  Z e d
 „  ƒ Z e d „  ƒ Z d „  Z d „  Z d „  Z d „  Z e d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sQ   
    A container for the nodes and labelled edges of a dependency structure.
    c         C   sm   h  d d <g  d <d d <d d <d d <} | g |  _ d |  _ d |  _ | o |  i | ƒ n d S(	   s  
        We place a dummy 'top' node in the first position 
        in the nodelist, since the root node is often assigned '0'
        as its head. This also means that the indexing of the nodelist
        corresponds directly to the Malt-TAB format, which starts at 1.
        t   wordt   depst   TOPt   relt   tagi    t   addressN(   t   Nonet   nodelistt   roott   streamt   _parse(   t   selft   tree_strt   top(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   __init__   s    3		c         C   sh   t  |  i ƒ d } xN | d j o@ |  i | } | d | j o |  i i | ƒ n | d 8} q Wd S(   sx   
        Removes the node with the given address.  References 
        to this node in others will still exist.
        i   i    R   N(   t   lenR
   t   pop(   R   R   t
   node_indext   node(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   remove_by_address,   s    c         C   sh   xa |  i  D]V } g  } x= | d D]1 } | | j o | i | ƒ q! | i | ƒ q! W| | d <q
 Wd S(   sq   
        Redirects arcs to any of the nodes in the originals list 
        to the redirect node address.
        R   N(   R
   t   append(   R   t	   originalst   redirectR   t   new_depst   dep(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   redirect_arcs8   s    
  c         C   sO   xH |  i  D]= } | d | j o& | | d j o | d i | ƒ q
 q
 Wd S(   sx   
        Adds an arc from the node specified by head_address to the 
        node specified by the mod address.
        R   R   N(   R
   R   (   R   t   head_addresst   mod_addressR   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   add_arcF   s    
 "c         C   sk   xd |  i  D]Y } xP |  i  D]E } | d | d j o* | d d j o | d i | d ƒ q q Wq
 Wd S(   sr   
        Fully connects all non-root nodes.  All nodes are set to be dependents
        of the root node.
        R   R   R   R   N(   R
   R   (   R   t   node1t   node2(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   connect_graphO   s    
 
 &c         C   s6   x* |  i  D] } | d | j o | Sq
 q
 Wd GHd S(   s:   
        Returns the node with the given address.
        R   s2   THROW ERROR: address not found in -get_by_address-iÿÿÿÿ(   R
   (   R   t   node_addressR   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   get_by_addressZ   s    
 c         C   s1   x* |  i  D] } | d | j o t Sq
 q
 Wt S(   sr   
        Returns true if the graph contains a node with the given node 
        address, false otherwise.
        R   (   R
   t   Truet   False(   R   R#   R   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   contains_addressd   s
    
 c         C   s   t  |  i ƒ S(   N(   R   R
   (   R   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   __str__n   s    c         C   s   d t  |  i ƒ S(   Ns   <DependencyGraph with %d nodes>(   R   R
   (   R   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   __repr__q   s    c         C   s   t  t |  ƒ i ƒ  ƒ S(   s8   
        @param file: a file in Malt-TAB format
        (   R   t   opent   read(   t   file(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   loadt   s    c         C   s(   t  i d ƒ } t  i | d |  ƒ i ƒ  S(   sL   
        Deal with lines in which spaces are used rather than tabs.
        s    +s   	(   t   ret   compilet   subt   strip(   t   linet   SPC(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt
   _normalize{   s    c            s<   |  i  | d } |  i  | d ‰  t ‡  f d †  | Dƒ ƒ S(   sl   
        Returns the number of left children under the node specified
        by the given address.
        R   R   c         3   s*   x# |  ] } | ˆ  j  o	 d  Vq q Wd S(   i   N(    (   t   .0t   c(   t   index(    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pys	   <genexpr>Š   s    (   R
   t   sum(   R   R   t   children(    (   R7   s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   left_childrenƒ   s    c            s<   |  i  | d } |  i  | d ‰  t ‡  f d †  | Dƒ ƒ S(   sm   
        Returns the number of right children under the node specified
        by the given address.
        R   R   c         3   s*   x# |  ] } | ˆ  j o	 d  Vq q Wd S(   i   N(    (   R5   R6   (   R7   (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pys	   <genexpr>“   s    (   R
   R8   (   R   R   R9   (    (   R7   s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   right_childrenŒ   s    c         C   s,   |  i  | d ƒ p |  i i | ƒ n d  S(   NR   (   R'   R
   R   (   R   R   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   add_node•   s    c         C   s-  g  } | i  d ƒ D]' } | i ƒ  o | t i | ƒ q q ~ } g  } x·t | ƒ D]©\ } } y†| i  d ƒ } t | ƒ } | d j o | \ }	 }
 } d } ni | d j o | \ }	 }
 } } nF | d j o( | \
 } }	 } } }
 } } } } } n t d | ƒ ‚ t | ƒ } |  i i	 h  | d d	 <|	 d
 <|
 d <| d <| d <g  } | D]( \ } } | | d j o | | qdqd~ d <ƒ y  |  i | d i	 | d ƒ Wn* t
 j
 o | i	 | d | f ƒ n XWqW t j
 o PqW XqW W|  i d d d } |  i | |  _ d  S(   Ns   
s   	i   t    i   i
   sT   Number of tab-delimited fields (%d) not supported by CoNLL(10) or Malt-Tab(4) formati   R   R   R   t   headR   R   i    (   t   splitR1   R   R4   t	   enumerateR   t
   ValueErrort   intR
   R   t
   IndexErrorR   (   R   t   inputt   _[1]R2   t   linest   tempR7   t   cellst   nrCellsR   R   R>   R   t   _t   _[2]t   dt   ht   root_address(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyR   ™   s6    D 
(,B  
c         C   s.   | d } | o | d j o | Sq* n | S(   NR   t   ,(    (   R   R   t   filtert   w(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   _word»   s    
c         C   sq   |  i  | } | d } | d } t | ƒ d j o | Sn2 t | g  } | D] } | |  i | ƒ qM ~ ƒ Sd S(   sû   
        Recursive function for turning dependency graphs into
        NLTK trees.
        @type i: C{int} 
        @param i: index of a node in C{nodelist}
        @return: either a word (if the indexed node 
        is a leaf) or a L{Tree}.
        R   R   i    N(   R
   R   R    t   _tree(   R   t   iR   R   R   RE   t   j(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyRS   Á   s    


c         C   sN   |  i  } | d } | d } t | g  } | D] } | |  i | ƒ q. ~ ƒ S(   s•   
        Starting with the C{root} node, build a dependency tree using the NLTK 
        L{Tree} constructor. Dependency labels are omitted.
        R   R   (   R   R    RS   (   R   R   R   R   RE   RT   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   treeÕ   s    	

c         C   s1   y |  i  | d SWn t j
 o d  Sn Xd  S(   NR>   (   R
   RC   R	   (   R   RT   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   _hdß   s    c         C   s1   y |  i  | d SWn t j
 o d  Sn Xd  S(   NR   (   R
   RC   R	   (   R   RT   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   _relå   s    c      
   C   sR  h  } xF |  i  D]; } x2 | d D]& } t | d | g ƒ } d | | <q! Wq Wd } xö t t |  i  ƒ ƒ D]ß } h  } xh | D]` } xW | D]O }	 | d |	 d j o4 t | d |	 d g ƒ } | | | |	 | | <q‹ q‹ Wq~ Wxe | D]] }
 | |
 | |
 <|
 d |
 d j o4 |
 d GH|  i |  i |
 d ƒ |
 d ƒ } | Sqé qé Wqk Wt S(   NR   R   i   i    (   R
   t   tuplet   rangeR   t   get_cycle_pathR$   R&   (   R   t	   distancesR   R   t   keyt   windowt   nt   new_entriest   pair1t   pair2t   pairt   path(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   contains_cycleì   s4    
     " 	#c         C   s”   x. | d D]" } | | j o | d g Sq q Wx\ | d D]P } |  i  |  i | ƒ | ƒ } t | ƒ d j o | i d | d ƒ | Sq< q< Wg  S(   NR   R   i    (   R[   R$   R   t   insert(   R   t	   curr_nodet   goal_node_indexR   Rd   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyR[     s      c   	   
   C   s  g  } xð t  |  i d ƒ D]Û \ } } | d | d | d | d f \ } } } } | d j o | i d | | | f ƒ q | d j o! | i d	 | | | | f ƒ q | d
 j o+ | i d | d | | | | | f ƒ q t d | ƒ ‚ q Wd i | ƒ S(   s¼   
        The dependency graph in CoNLL format.
        
        @param style: the style to use for the format (3, 4, 10 columns)
        @type style: C{int}
        @rtype: C{str}
        i   R   R   R>   R   i   s	   %s	%s	%s
i   s   %s	%s	%s	%s
i
   s   %s	%s	_	%s	%s	_	%s	%s	_	_
sT   Number of tab-delimited fields (%d) not supported by CoNLL(10) or Malt-Tab(4) formatR=   (   R@   R
   R   RA   t   join(	   R   t   styleRF   RT   R   R   R   R>   R   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   to_conll  s    	 .!+(   t   __name__t
   __module__t   __doc__R	   R   R   R   R   R"   R$   R'   R(   R)   t   staticmethodR-   R4   R:   R;   R<   R   R%   RR   RS   RV   RW   RX   Re   R[   Rk   (    (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyR      s0   						
	
								"		
				c         C   sÄ   t  d t |  i ƒ ƒ } g  } | D]< } |  i | ƒ o& | | |  i | ƒ |  i | ƒ f q# q# ~ } h  |  _ x& | D] } |  i | d |  i | <qx Wt i ƒ  } | i | ƒ | i	 | ƒ | S(   sp   
    Convert the data in a C{nodelist} into a networkx 
    labeled directed graph.
    @rtype: C{XDigraph}
    i   R   (
   RZ   R   R
   RW   RX   t	   nx_labelst   NXt   XDiGrapht   add_nodes_fromt   add_edges_from(   R   t   nx_nodelistRE   R_   t   nx_edgelistt   g(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   nx_graph%  s    I	 c           C   s    t  ƒ  t ƒ  t ƒ  t ƒ  d  S(   N(   t	   malt_demot
   conll_demot   conll_file_demot   cycle_finding_demo(    (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyt   demo8  s    c      
   C   sï   t  d ƒ } | i ƒ  } | i ƒ  GH|  oÁ y d d k } d d k } Wn" t j
 o ‚  | i ƒ  } n X| i ƒ  | i | d d ƒ} | i	 | | d d ƒ| i
 | | | i ƒ | i g  ƒ | i g  ƒ | i d ƒ | i ƒ  n d S(	   sw   
    A demonstration of the result of reading a dependency
    version of the first sentence of the Penn Treebank.
    s  Pierre  NNP     2       NMOD
Vinken  NNP     8       SUB
,       ,       2       P
61      CD      5       NMOD
years   NNS     6       AMOD
old     JJ      2       NMOD
,       ,       2       P
will    MD      0       ROOT
join    VB      8       VC
the     DT      11      NMOD
board   NN      9       OBJ
as      IN      9       VMOD
a       DT      15      NMOD
nonexecutive    JJ      15      NMOD
director        NN      12      PMOD
Nov.    NNP     9       VMOD
29      CD      16      NMOD
.       .       9       VMOD
iÿÿÿÿNt   dimi   t	   node_sizei2   s   tree.png(   R   RV   t   pprintt   networkxt   pylabt   ImportErrorRx   t   infot   spring_layoutt   draw_networkx_nodest   draw_networkx_labelsRp   t   xtickst   ytickst   savefigt   show(   t   nxt   dgRV   Rq   t   PRw   t   pos(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyRy   >  s&    	
c          C   s:   t  t ƒ }  |  i ƒ  } | i ƒ  GH|  GH|  i d ƒ GHd S(   sh   
    A demonstration of how to read a string representation of 
    a CoNLL format dependency tree.
    i   N(   R   t   conll_data1RV   R€   Rk   (   R   RV   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyRz   k  s
    c          C   sp   d GHg  }  t  i d ƒ D] } | o |  t | ƒ q q ~  } x) | D]! } | i ƒ  } d | i ƒ  GHqG Wd  S(   Ns   Mass conll_read demo...s   

s   
(   t   conll_data2R?   R   RV   R€   (   RE   t   entryt   graphst   graphRV   (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyR{   v  s    4 c          C   s1  t  t ƒ }  |  i ƒ  GHt  ƒ  } h  d  d <d g d <d d <d d <} h  d  d <d g d <d	 d <d d <} h  d  d <d
 g d <d	 d <d d <} h  d  d <d g d <d	 d <d d <} h  d  d <d g d <d	 d <d
 d <} | | | | | g | _ | | _ | i ƒ  GHd  S(   NR   i   R   R   R   i    R   i   t   NTOPi   i   (   R   t   treebank_dataRe   R	   R
   R   (   R   t	   cyclic_dgR   t   child1t   child2t   child3t   child4(    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pyR|   ~  s    	-----	s  Pierre  NNP     2       NMOD
Vinken  NNP     8       SUB
,       ,       2       P
61      CD      5       NMOD
years   NNS     6       AMOD
old     JJ      2       NMOD
,       ,       2       P
will    MD      0       ROOT
join    VB      8       VC
the     DT      11      NMOD
board   NN      9       OBJ
as      IN      9       VMOD
a       DT      15      NMOD
nonexecutive    JJ      15      NMOD
director        NN      12      PMOD
Nov.    NNP     9       VMOD
29      CD      16      NMOD
.       .       9       VMOD
s/  
1   Ze                ze                Pron  Pron  per|3|evofmv|nom                 2   su      _  _
2   had               heb               V     V     trans|ovt|1of2of3|ev             0   ROOT    _  _
3   met               met               Prep  Prep  voor                             8   mod     _  _
4   haar              haar              Pron  Pron  bez|3|ev|neut|attr               5   det     _  _
5   moeder            moeder            N     N     soort|ev|neut                    3   obj1    _  _
6   kunnen            kan               V     V     hulp|ott|1of2of3|mv              2   vc      _  _
7   gaan              ga                V     V     hulp|inf                         6   vc      _  _
8   winkelen          winkel            V     V     intrans|inf                      11  cnj     _  _
9   ,                 ,                 Punc  Punc  komma                            8   punct   _  _
10  zwemmen           zwem              V     V     intrans|inf                      11  cnj     _  _
11  of                of                Conj  Conj  neven                            7   vc      _  _
12  terrassen         terras            N     N     soort|mv|neut                    11  cnj     _  _
13  .                 .                 Punc  Punc  punt                             12  punct   _  _
s  1   Cathy             Cathy             N     N     eigen|ev|neut                    2   su      _  _
2   zag               zie               V     V     trans|ovt|1of2of3|ev             0   ROOT    _  _
3   hen               hen               Pron  Pron  per|3|mv|datofacc                2   obj1    _  _
4   wild              wild              Adj   Adj   attr|stell|onverv                5   mod     _  _
5   zwaaien           zwaai             N     N     soort|mv|neut                    2   vc      _  _
6   .                 .                 Punc  Punc  punt                             5   punct   _  _

1   Ze                ze                Pron  Pron  per|3|evofmv|nom                 2   su      _  _
2   had               heb               V     V     trans|ovt|1of2of3|ev             0   ROOT    _  _
3   met               met               Prep  Prep  voor                             8   mod     _  _
4   haar              haar              Pron  Pron  bez|3|ev|neut|attr               5   det     _  _
5   moeder            moeder            N     N     soort|ev|neut                    3   obj1    _  _
6   kunnen            kan               V     V     hulp|ott|1of2of3|mv              2   vc      _  _
7   gaan              ga                V     V     hulp|inf                         6   vc      _  _
8   winkelen          winkel            V     V     intrans|inf                      11  cnj     _  _
9   ,                 ,                 Punc  Punc  komma                            8   punct   _  _
10  zwemmen           zwem              V     V     intrans|inf                      11  cnj     _  _
11  of                of                Conj  Conj  neven                            7   vc      _  _
12  terrassen         terras            N     N     soort|mv|neut                    11  cnj     _  _
13  .                 .                 Punc  Punc  punt                             12  punct   _  _

1   Dat               dat               Pron  Pron  aanw|neut|attr                   2   det     _  _
2   werkwoord         werkwoord         N     N     soort|ev|neut                    6   obj1    _  _
3   had               heb               V     V     hulp|ovt|1of2of3|ev              0   ROOT    _  _
4   ze                ze                Pron  Pron  per|3|evofmv|nom                 6   su      _  _
5   zelf              zelf              Pron  Pron  aanw|neut|attr|wzelf             3   predm   _  _
6   uitgevonden       vind              V     V     trans|verldw|onverv              3   vc      _  _
7   .                 .                 Punc  Punc  punt                             6   punct   _  _

1   Het               het               Pron  Pron  onbep|neut|zelfst                2   su      _  _
2   hoorde            hoor              V     V     trans|ovt|1of2of3|ev             0   ROOT    _  _
3   bij               bij               Prep  Prep  voor                             2   ld      _  _
4   de                de                Art   Art   bep|zijdofmv|neut                6   det     _  _
5   warme             warm              Adj   Adj   attr|stell|vervneut              6   mod     _  _
6   zomerdag          zomerdag          N     N     soort|ev|neut                    3   obj1    _  _
7   die               die               Pron  Pron  betr|neut|zelfst                 6   mod     _  _
8   ze                ze                Pron  Pron  per|3|evofmv|nom                 12  su      _  _
9   ginds             ginds             Adv   Adv   gew|aanw                         12  mod     _  _
10  achter            achter            Adv   Adv   gew|geenfunc|stell|onverv        12  svp     _  _
11  had               heb               V     V     hulp|ovt|1of2of3|ev              7   body    _  _
12  gelaten           laat              V     V     trans|verldw|onverv              11  vc      _  _
13  .                 .                 Punc  Punc  punt                             12  punct   _  _

1   Ze                ze                Pron  Pron  per|3|evofmv|nom                 2   su      _  _
2   hadden            heb               V     V     trans|ovt|1of2of3|mv             0   ROOT    _  _
3   languit           languit           Adv   Adv   gew|geenfunc|stell|onverv        11  mod     _  _
4   naast             naast             Prep  Prep  voor                             11  mod     _  _
5   elkaar            elkaar            Pron  Pron  rec|neut                         4   obj1    _  _
6   op                op                Prep  Prep  voor                             11  ld      _  _
7   de                de                Art   Art   bep|zijdofmv|neut                8   det     _  _
8   strandstoelen     strandstoel       N     N     soort|mv|neut                    6   obj1    _  _
9   kunnen            kan               V     V     hulp|inf                         2   vc      _  _
10  gaan              ga                V     V     hulp|inf                         9   vc      _  _
11  liggen            lig               V     V     intrans|inf                      10  vc      _  _
12  .                 .                 Punc  Punc  punt                             11  punct   _  _

1   Zij               zij               Pron  Pron  per|3|evofmv|nom                 2   su      _  _
2   zou               zal               V     V     hulp|ovt|1of2of3|ev              7   cnj     _  _
3   mams              mams              N     N     soort|ev|neut                    4   det     _  _
4   rug               rug               N     N     soort|ev|neut                    5   obj1    _  _
5   ingewreven        wrijf             V     V     trans|verldw|onverv              6   vc      _  _
6   hebben            heb               V     V     hulp|inf                         2   vc      _  _
7   en                en                Conj  Conj  neven                            0   ROOT    _  _
8   mam               mam               V     V     trans|ovt|1of2of3|ev             7   cnj     _  _
9   de                de                Art   Art   bep|zijdofmv|neut                10  det     _  _
10  hare              hare              Pron  Pron  bez|3|ev|neut|attr               8   obj1    _  _
11  .                 .                 Punc  Punc  punt                             10  punct   _  _

1   Of                of                Conj  Conj  onder|metfin                     0   ROOT    _  _
2   ze                ze                Pron  Pron  per|3|evofmv|nom                 3   su      _  _
3   had               heb               V     V     hulp|ovt|1of2of3|ev              0   ROOT    _  _
4   gewoon            gewoon            Adj   Adj   adv|stell|onverv                 10  mod     _  _
5   met               met               Prep  Prep  voor                             10  mod     _  _
6   haar              haar              Pron  Pron  bez|3|ev|neut|attr               7   det     _  _
7   vriendinnen       vriendin          N     N     soort|mv|neut                    5   obj1    _  _
8   rond              rond              Adv   Adv   deelv                            10  svp     _  _
9   kunnen            kan               V     V     hulp|inf                         3   vc      _  _
10  slenteren         slenter           V     V     intrans|inf                      9   vc      _  _
11  in                in                Prep  Prep  voor                             10  mod     _  _
12  de                de                Art   Art   bep|zijdofmv|neut                13  det     _  _
13  buurt             buurt             N     N     soort|ev|neut                    11  obj1    _  _
14  van               van               Prep  Prep  voor                             13  mod     _  _
15  Trafalgar_Square  Trafalgar_Square  MWU   N_N   eigen|ev|neut_eigen|ev|neut      14  obj1    _  _
16  .                 .                 Punc  Punc  punt                             15  punct   _  _
t   __main__(   Rn   t	   nltk.treeR    R€   R   R.   t   objectR   Rx   R}   R&   Ry   Rz   R{   R|   R–   R   R‘   Rl   (    (    (    s0   /p/zhu/06/nlp/nltk/nltk/parse/dependencygraph.pys   <module>   s    ÿ 		-			V