³ò
ŽB_Kc           @   si  d  Z  d d k Td d k Td d k Td d k Td e f d „  ƒ  YZ d e e f d „  ƒ  YZ d e	 f d „  ƒ  YZ
 d	 e
 f d
 „  ƒ  YZ d e
 f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ e ƒ  e ƒ  e ƒ  e ƒ  e ƒ  g Z e ƒ  e ƒ  e ƒ  e
 ƒ  g Z e ƒ  e ƒ  e ƒ  e
 ƒ  g Z e ƒ  e ƒ  e ƒ  e
 ƒ  g Z e ƒ  e ƒ  e  ƒ  e ƒ  g Z! d e" f d „  ƒ  YZ# d e# f d „  ƒ  YZ$ d e# f d „  ƒ  YZ% d e# f d  „  ƒ  YZ& d! e# f d" „  ƒ  YZ' d# e# f d$ „  ƒ  YZ( e ƒ  e) ƒ  e ƒ  e ƒ  e ƒ  g Z* e ƒ  e) ƒ  e ƒ  e ƒ  g Z+ e ƒ  e, ƒ  e- ƒ  e ƒ  g Z. e ƒ  e, ƒ  e/ ƒ  e ƒ  g Z0 d% e# e1 f d& „  ƒ  YZ2 d' e2 f d( „  ƒ  YZ3 d) e2 f d* „  ƒ  YZ4 d+ e2 f d, „  ƒ  YZ5 d- e2 f d. „  ƒ  YZ6 e7 e8 e7 d/ d0 d1 d2 „ Z9 e: d3 j o e9 ƒ  n d4 S(5   sá  
Data classes and parser implementations for I{incremental} chart 
parsers, which use dynamic programming to efficiently parse a text.  
A X{chart parser} derives parse trees for a text by iteratively adding 
"edges" to a "chart".  Each X{edge} represents a hypothesis about the tree
structure for a subsequence of the text.  The X{chart} is a
"blackboard" for composing and combining these hypotheses.

A parser is X{incremental}, if it guarantees that for all i, j where i < j,
all edges ending at i are built before any edges ending at j.    
This is appealing for, say, speech recognizer hypothesis filtering.

The main parser class is L{EarleyChartParser}, which is a top-down
algorithm, originally formulated by Jay Earley (1970).
iÿÿÿÿ(   t   *t   IncrementalChartc           B   sP   e  Z d  „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 RS(   c         C   s5   t  d „  |  i ƒ  Dƒ ƒ |  _ h  |  _ h  |  _ d  S(   Nc         s   s   x |  ] } g  Vq Wd  S(   N(    (   t   .0t   x(    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>,   s    (   t   tuplet
   _positionst
   _edgelistst   _edge_to_cplst   _indexes(   t   self(    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt
   initialize*   s    	c         C   s   t  |  i ƒ  ƒ S(   N(   t   listt	   iteredges(   R	   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt   edges5   s    c         C   s   d „  |  i  Dƒ S(   Nc         s   s*   x# |  ] } x | D] } | Vq Wq Wd  S(   N(    (   R   t   edgelistt   edge(    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>9   s    (   R   (   R	   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR   8   s    c            s¨   |  i  | } ˆ  h  j o t | ƒ Sn ˆ  i ƒ  } | i ƒ  t | ƒ } | |  i j o |  i | ƒ n t ‡  f d †  | Dƒ ƒ } t |  i | | i | g  ƒ ƒ S(   Nc         3   s   x |  ] } ˆ  | Vq Wd  S(   N(    (   R   t   key(   t   restrictions(    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>J   s    (   R   t   itert   keyst   sortR   R   t
   _add_indext   get(   R	   t   endR   R   t
   restr_keyst   vals(    (   R   s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt   select;   s    
c            sÍ   x/ | D]' } t  t | ƒ p t d | ‚ q q Wt d „  |  i ƒ  Dƒ ƒ } |  i | <xm t |  i ƒ D]\ \ } } | | } xC | D]; ‰  t ‡  f d †  | Dƒ ƒ } | i | g  ƒ i	 ˆ  ƒ q† Wqi Wd  S(   Ns   Bad restriction: %sc         s   s   x |  ] } h  Vq Wd  S(   N(    (   R   R   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>T   s    c         3   s%   x |  ] } t  ˆ  | ƒ ƒ  Vq Wd  S(   N(   t   getattr(   R   R   (   R   (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>Z   s    (
   t   hasattrt   EdgeIt
   ValueErrorR   R   R   t	   enumerateR   t
   setdefaultt   append(   R	   R   R   t   indexR   R   t
   this_indexR   (    (   R   s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR   M   s     ' 
 c            si   ˆ  i  ƒ  } xV |  i i ƒ  D]E \ } } t ‡  f d †  | Dƒ ƒ } | | i | g  ƒ i ˆ  ƒ q Wd  S(   Nc         3   s%   x |  ] } t  ˆ  | ƒ ƒ  Vq Wd  S(   N(   R   (   R   R   (   R   (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>`   s    (   R   R   t   itemsR   R    R!   (   R	   R   R   R   R"   R   (    (   R   s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt   _register_with_indexes]   s
     c         C   s   |  i  | i ƒ  i | ƒ d  S(   N(   R   R   R!   (   R	   R   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt   _append_edgec   s    c         C   s   t  |  i ƒ  d ƒ S(   Ni   (   t   xranget
   num_leaves(   R	   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR   f   s    (
   t   __name__t
   __module__R
   R   R   R   R   R%   R&   R   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR   )   s   							t   FeatureIncrementalChartc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c            s«   ˆ i  | } ˆ  h  j o t | ƒ Sn ˆ  i ƒ  } | i ƒ  t | ƒ } | ˆ i j o ˆ i | ƒ n t ‡  ‡ f d †  | Dƒ ƒ } t ˆ i | | i | g  ƒ ƒ S(   Nc         3   s&   x |  ] } ˆ i  ˆ  | ƒ Vq Wd  S(   N(   t   _get_type_if_possible(   R   R   (   R   R	   (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>z   s   	(   R   R   R   R   R   R   R   R   (   R	   R   R   R   R   R   (    (   R   R	   s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR   k   s    
c            sÐ   x/ | D]' } t  t | ƒ p t d | ‚ q q Wt d „  ˆ  i ƒ  Dƒ ƒ } ˆ  i | <xp t ˆ  i ƒ D]_ \ } } | | } xF | D]> ‰ t ‡  ‡ f d †  | Dƒ ƒ } | i | g  ƒ i	 ˆ ƒ q† Wqi Wd  S(   Ns   Bad restriction: %sc         s   s   x |  ] } h  Vq Wd  S(   N(    (   R   R   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>…   s    c         3   s.   x' |  ]  } ˆ  i  t ˆ | ƒ ƒ  ƒ Vq Wd  S(   N(   R,   R   (   R   R   (   R	   R   (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>‹   s   	(
   R   R   R   R   R   R   R   R   R    R!   (   R	   R   R   R"   R   R   R#   R   (    (   R	   R   s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR   ~   s     ' 
 c            sl   ˆ i  ƒ  } xY ˆ  i i ƒ  D]H \ } } t ‡  ‡ f d †  | Dƒ ƒ } | | i | g  ƒ i ˆ ƒ q Wd  S(   Nc         3   s.   x' |  ]  } ˆ  i  t ˆ | ƒ ƒ  ƒ Vq Wd  S(   N(   R,   R   (   R   R   (   R	   R   (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys	   <genexpr>’   s   	(   R   R   R$   R   R    R!   (   R	   R   R   R   R"   R   (    (   R	   R   s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR%      s     (   R)   R*   R   R   R%   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR+   j   s   		t   CompleteFundamentalRulec           B   s   e  Z d  „  Z RS(   c         c   s7   | i  ƒ  o& x# |  i | | ƒ D] } | Vq  Wn d  S(   N(   t   is_completet   _apply_complete(   R	   t   chartt   grammarR   t   new_edge(    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt
   apply_iter›   s     (   R)   R*   R3   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR-   š   s   t   CompleterRulec           B   s   e  Z d  „  Z RS(   c         c   sK   t  | t ƒ p7 | i ƒ  o& x# |  i | | ƒ D] } | Vq0 WqG n d  S(   N(   t
   isinstancet   LeafEdgeR.   R/   (   R	   R0   R1   R   R2   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR3   ¡   s
     (   R)   R*   R3   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR4       s   t   ScannerRulec           B   s   e  Z d  „  Z RS(   c         c   sK   t  | t ƒ o7 | i ƒ  o& x# |  i | | ƒ D] } | Vq0 WqG n d  S(   N(   R5   R6   R.   R/   (   R	   R0   R1   R   R2   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR3   ¨   s
     (   R)   R*   R3   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR7   §   s   t   PredictorRulec           B   s   e  Z RS(    (   R)   R*   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR8   ®   s   t   FilteredCompleteFundamentalRulec           B   s   e  Z d  „  Z RS(   c         c   s=   | i  ƒ  o, x) |  i | | i | ƒ D] } | Vq& Wn d  S(   N(   R.   R/   t   leftcorners(   R	   R0   R1   R   R2   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR3   ²   s     (   R)   R*   R3   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR9   ±   s   t   FeatureCompleteFundamentalRulec           B   s   e  Z e ƒ  Z d  „  Z RS(   c         c   s{   | i  ƒ  oj |  i } x^ | i d | i ƒ  d t d | i ƒ  ƒ D]. } x% | i | | | | ƒ D] } | Vq` WqA Wn d  S(   NR   R.   t   next(   R.   t   _fundamental_ruleR   t   startt   Falset   lhsR3   (   R	   R0   R1   R   t   frt	   left_edgeR2   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR3   ½   s    	  (   R)   R*   t   FeatureFundamentalRuleR=   R3   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR;   »   s   	t   FeatureCompleterRulec           B   s   e  Z e ƒ  Z d  „  Z RS(   c         c   s@   t  | t ƒ p, x) |  i i | | | ƒ D] } | Vq) Wn d  S(   N(   R5   R6   R=   R3   (   R	   R0   R1   R   R2   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR3   È   s     (   R)   R*   R;   R=   R3   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRD   Æ   s   	t   FeatureScannerRulec           B   s   e  Z e ƒ  Z d  „  Z RS(   c         c   s@   t  | t ƒ o, x) |  i i | | | ƒ D] } | Vq) Wn d  S(   N(   R5   R6   R=   R3   (   R	   R0   R1   R   R2   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyR3   Ï   s     (   R)   R*   R;   R=   R3   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRE   Í   s   	t   FeaturePredictorRulec           B   s   e  Z RS(    (   R)   R*   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRF   Ô   s   t   IncrementalChartParserc           B   s/   e  Z d  Z e d d e d „ Z e d „ Z RS(   sk  
    An I{incremental} chart parser implementing Jay Earley's 
    parsing algorithm:

        - For each index I{end} in [0, 1, ..., N]:
          - For each I{edge} s.t. I{edge}.end = I{end}:
            - If I{edge} is incomplete, and I{edge}.next is not a part
              of speech:
                - Apply PredictorRule to I{edge}
            - If I{edge} is incomplete, and I{edge}.next is a part of
              speech:
                - Apply ScannerRule to I{edge}
            - If I{edge} is complete:
                - Apply CompleterRule to I{edge}
        - Return any complete parses in the chart
    i    i2   c         C   sŸ   | |  _  | |  _ | |  _ | |  _ g  |  _ g  |  _ xb | D]Z } | i d j o |  i i | ƒ q= | i d j o |  i i | ƒ q= t d ƒ ‚ q= Wd S(   s  
        Create a new Earley chart parser, that uses C{grammar} to
        parse texts.
        
        @type grammar: C{ContextFreeGrammar}
        @param grammar: The grammar used to parse texts.
        @type trace: C{int}
        @param trace: The level of tracing that should be used when
            parsing a text.  C{0} will generate no tracing output;
            and higher numbers will produce more verbose tracing
            output.
        @type trace_chart_width: C{int}
        @param trace_chart_width: The default total width reserved for 
            the chart in trace output.  The remainder of each line will 
            be used to display edges. 
        @param chart_class: The class that should be used to create
            the charts used by this parser.
        i    i   s9   Incremental inference rules must have NUM_EDGES == 0 or 1N(	   t   _grammart   _tracet   _trace_chart_widtht   _chart_classt   _axiomst   _inference_rulest	   NUM_EDGESR!   R   (   R	   R1   t   strategyt   tracet   trace_chart_widtht   chart_classt   rule(    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt   __init__  s    						 c      
   C   sÊ  | d  j o |  i } n |  i } t | ƒ } |  i i | ƒ |  i | ƒ } |  i } |  i | i ƒ  d } | o | i	 | ƒ GHn x9 |  i
 D]. } | i | | ƒ } | | | | | | ƒ q‘ W|  i }	 x÷ t | i ƒ  d ƒ D]ß }
 | d j o d G|
 Gd GHn t | i d |
 ƒ ƒ } x  | o˜ | i ƒ  } x… |	 D]} } | i | | | ƒ } | o& t | ƒ } | | | | | | ƒ n x2 | D]* } | i ƒ  |
 j o | i | ƒ q‹q‹Wq<Wq"Wqã W| S(   Ni   s   
* Processing queue:s   
R   (   t   NoneRI   t   _trace_new_edgesR   RH   t   check_coverageRK   RJ   R(   t	   pp_leavesRL   t   applyRM   t   rangeR   t   popR3   R   R!   (   R	   t   tokensRP   t   trace_new_edgesR0   R1   t   trace_edge_widtht   axiomt	   new_edgest   inference_rulesR   t   agendaR   RS   R2   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt   chart_parse(  s<    		
 	 
  "(   R)   R*   t   __doc__t   BU_LC_INCREMENTAL_STRATEGYR   RT   RU   Rc   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRG   ò   s
   #t   EarleyChartParserc           B   s   e  Z d  „  Z RS(   c         K   s   t  i |  | t |  d  S(   N(   RG   RT   t   EARLEY_STRATEGY(   R	   R1   t   parser_args(    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   K  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRf   J  s   	t   IncrementalTopDownChartParserc           B   s   e  Z d  „  Z RS(   c         K   s   t  i |  | t |  d  S(   N(   RG   RT   t   TD_INCREMENTAL_STRATEGY(   R	   R1   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   P  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRi   O  s   t   IncrementalBottomUpChartParserc           B   s   e  Z d  „  Z RS(   c         K   s   t  i |  | t |  d  S(   N(   RG   RT   t   BU_INCREMENTAL_STRATEGY(   R	   R1   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   T  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRk   S  s   t(   IncrementalBottomUpLeftCornerChartParserc           B   s   e  Z d  „  Z RS(   c         K   s   t  i |  | t |  d  S(   N(   RG   RT   Re   (   R	   R1   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   X  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRm   W  s   t    IncrementalLeftCornerChartParserc           B   s   e  Z d  „  Z RS(   c         K   s7   | i  ƒ  p t d ƒ ‚ n t i |  | t |  d  S(   NsN   IncrementalLeftCornerParser only works for grammars without empty productions.(   t   is_nonemptyR   RG   RT   t   LC_INCREMENTAL_STRATEGY(   R	   R1   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   \  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRn   [  s   t   FeatureIncrementalChartParserc           B   s   e  Z e d  e d „ Z RS(   i   c      
   K   s)   t  i |  | d | d | d | | d  S(   NRO   RQ   RR   (   RG   RT   (   R	   R1   RO   RQ   RR   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   y  s
    (   R)   R*   t"   BU_LC_INCREMENTAL_FEATURE_STRATEGYR+   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRq   x  s   t   FeatureEarleyChartParserc           B   s   e  Z d  „  Z RS(   c         K   s   t  i |  | t |  d  S(   N(   Rq   RT   t   EARLEY_FEATURE_STRATEGY(   R	   R1   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   …  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRs   „  s   	t$   FeatureIncrementalTopDownChartParserc           B   s   e  Z d  „  Z RS(   c         K   s   t  i |  | t |  d  S(   N(   Rq   RT   t   TD_INCREMENTAL_FEATURE_STRATEGY(   R	   R1   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   Š  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRu   ‰  s   t%   FeatureIncrementalBottomUpChartParserc           B   s   e  Z d  „  Z RS(   c         K   s   t  i |  | t |  d  S(   N(   Rq   RT   t   BU_INCREMENTAL_FEATURE_STRATEGY(   R	   R1   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   Ž  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRw     s   t/   FeatureIncrementalBottomUpLeftCornerChartParserc           B   s   e  Z d  „  Z RS(   c         K   s   t  i |  | t |  d  S(   N(   Rq   RT   Rr   (   R	   R1   Rh   (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRT   ’  s    (   R)   R*   RT   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyRy   ‘  s   i   s$   I saw John with a dog with my cookiei   c         C   s  d d k  } d d k } t i i i ƒ  } | o d GH| GHn d GH| GH| i ƒ  }	 |	 GHHt | d | ƒ}
 | i ƒ  } |
 i	 |	 ƒ } | i
 | i ƒ  ƒ } | i ƒ  | } | o! t | ƒ | j p
 t d ‚ n | o x& | D] } | GHqã Wn d Gt | ƒ GH|  o d G| GHn d S(	   s0   
    A demonstration of the Earley parsers.
    iÿÿÿÿNs	   * Grammars   * Sentence:RP   s   Not all parses founds	   Nr trees:s   Time:(   t   syst   timet   nltkt   parseR0   t   demo_grammart   splitRf   t   clockRc   t   parsesR>   t   lent   AssertionError(   t   should_print_timest   should_print_grammart   should_print_treesRP   t   sentt	   numparsesRz   R{   R1   R\   t   earleyt   tR0   R   t   tree(    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pyt   demoš  s.    	! t   __main__N(;   Rd   t   nltk.grammart   apiR0   t   featurechartt   ChartR   t   FeatureChartR+   t   SingleEdgeFundamentalRuleR-   R4   R7   t   CachedTopDownPredictRuleR8   t!   FilteredSingleEdgeFundamentalRuleR9   t    FeatureSingleEdgeFundamentalRuleR;   RD   RE   t   FeatureTopDownPredictRuleRF   t   LeafInitRulet   TopDownInitRuleRg   Rj   t   EmptyPredictRulet   BottomUpPredictRuleRl   t   BottomUpPredictCombineRuleRe   t"   FilteredBottomUpPredictCombineRuleRp   t   ChartParserRG   Rf   Ri   Rk   Rm   Rn   t   FeatureTopDownInitRuleRt   Rv   t   FeatureEmptyPredictRulet   FeatureBottomUpPredictRuleRx   t!   FeatureBottomUpPredictCombineRuleRr   t   FeatureChartParserRq   Rs   Ru   Rw   Ry   t   TrueR?   RŒ   R)   (    (    (    s,   /p/zhu/06/nlp/nltk/nltk/parse/earleychart.pys   <module>   sˆ   



A0
X	$