³ò
’B_Kc        
   @   so  d  Z  d d k l Z d d k Z d d k Z d d k l Z d d k l Z d d k	 Td e
 f d „  ƒ  YZ d	 e f d
 „  ƒ  YZ d „  Z d „  Z d „  Z d „  Z e d ƒ e d „ ƒ Z d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d Z d d „ Z e d d „ Z d d „ Z d d „ Z d d d „ Z e d j o e d d  d ƒn d S(!   sL   
This module provides data structures for representing first-order
models. 
iÿÿÿÿ(   t   pformatN(   t	   decorator(   t
   deprecated(   t   *t   Errorc           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR      s    t	   Undefinedc           B   s   e  Z RS(    (   R   R   (    (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR      s    c         O   sm   t  i |  ƒ } t t | d | ƒ ƒ } | i d d  ƒ o% Hx! | i ƒ  D] } d | GHqI Wn |  | | Ž  S(   Ni    t   traces   %s => %s(   t   inspectt
   getargspect   dictt   zipt   popt   Nonet   items(   t   ft   argst   kwt   argspect   dt   item(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR       s     c         C   s›   t  |  ƒ d j o t Sn} |  t g  } |  D]! } t | t ƒ o | | q, q, ~ ƒ j o- t  t |  ƒ ƒ t  t |  ƒ ƒ j o t Sn t d |  ‚ d S(   s¬   
    Check whether a set represents a relation (of any arity).

    @param s: a set containing C{tuple}s of C{str} elements
    @type s: C{set}
    @rtype: C{bool}
        i    s.   Set %r contains sequences of different lengthsN(   t   lent   Truet   sett
   isinstancet   tuplet   maxt   mint
   ValueError(   t   st   _[1]t   elem(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   is_rel)   s    	B%c         C   sv   t  ƒ  } xf |  D]^ } t | t ƒ o | i | f ƒ q t | t ƒ o | i t | ƒ ƒ q | i | ƒ q W| S(   sj  
    Convert a set containing individuals (strings or numbers) into a set of 
    unary tuples. Any tuples of strings already in the set are passed through 
    unchanged.
    
    For example:
      - set(['a', 'b']) => set([('a',), ('b',)])
      - set([3, 27]) => set([('3',), ('27',)])
      
    @type s: C{set}
    @rtype: C{set} of C{tuple} of C{str}
    (   R   R   t   strt   addt   int(   R   t   newR    (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   set2rel;   s    	 c         C   s/   t  |  ƒ d j o d Sn t  t |  ƒ d ƒ S(   st   
    Check the arity of a relation.
    @type rel: C{set} of C{tuple}s
    @rtype: C{int} of C{tuple} of C{str}
    i    (   R   t   list(   t   rel(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   arityR   s    s   Simply use 'args in rel'c         C   s   t  |  ƒ p t ‚ | |  j S(   s¸   
    Apply a relation (as set of tuples) to an argument.
    
    @type rel: C{set} of C{tuple}s
    @param args: a sequence of appropriate semantic arguments
    @rtype: C{bool} 
    (   R!   t   AssertionError(   R(   R   R   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   app\   s    	t	   Valuationc           B   s_   e  Z d  Z d „  Z d „  Z d „  Z d „  Z e e d d ƒZ d „  Z	 e e	 d d ƒZ
 RS(	   sâ  
    A dictionary which represents a model-theoretic Valuation of non-logical constants.
    Keys are strings representing the constants to be interpreted, and values correspond 
    to individuals (represented as strings) and n-ary relations (represented as sets of tuples
    of strings).

    An instance of L{Valuation} will raise a KeyError exception (i.e.,
    just behave like a standard  dictionary) if indexed with an expression that
    is not in its list of symbols.
    c         C   s¥   t  i |  ƒ x‘ | D]‰ \ } } t | t ƒ p t | t ƒ o | |  | <q t | t ƒ o t | ƒ |  | <q t i d | | f d d ƒ} t	 | ƒ ‚ q Wd S(   sB   
        @param iter: a C{list} of (symbol, value) pairs.
        sG   Error in initializing Valuation. Unrecognized value for symbol '%s':
%st   widthiB   N(
   R   t   __init__R   R"   t   boolR   R&   t   textwrapt   fillR   (   t   selft   itert   symt   valt   msg(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR.   t   s      	c         C   s2   | |  j o t  i |  | ƒ Sn t d | ‚ d  S(   Ns   Unknown expression: '%s'(   R   t   __getitem__R   (   R2   t   key(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR7   „   s    c         C   s
   t  |  ƒ S(   N(   R    (   R2   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   __str__Š   s    c         C   s¢   g  } x |  i  ƒ  D] } t | t ƒ o | i | ƒ q t | t ƒ pJ | i g  } | D]+ } | D] } | d  j	 o | | qe qe q[ ~ ƒ q q Wt | ƒ S(   N(   t   valuesR   R"   t   appendR/   t   extendR   R   (   R2   t   domR5   R   R   R    (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt
   _getDomain   s     Nt   docs7   Set-theoretic domain of the value-space of a Valuation.c         C   s   t  |  i ƒ  ƒ S(   N(   t   sortedt   keys(   R2   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   _getSymbols™   s    s9   The non-logical constants which the Valuation recognizes.(   R   R   t   __doc__R.   R7   R9   R>   t   propertyt   domainRB   t   symbols(    (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR,   i   s   
									t
   Assignmentc           B   sS   e  Z d  Z e d „ Z d „  Z d „  Z e d „ Z d „  Z d „  Z	 d „  Z
 RS(   s‡  
    A dictionary which represents an assignment of values to variables.

    An assigment can only assign values from its domain.

    If an unknown expression M{a} is passed to a model M{M}'s
    interpretation function M{i}, M{i} will first check whether M{M}'s
    valuation assigns an interpretation to M{a} as a constant, and if
    this fails, M{i} will delegate the interpretation of M{a} to
    M{g}. M{g} only assigns values to individual variables (i.e.,
    members of the class L{IndividualVariableExpression} in the L{logic}
    module. If a variable is not assigned a value by M{g}, it will raise
    an C{Undefined} exception.
    c         C   s’   t  i |  ƒ | |  _ | og xd | D]X \ } } | |  i j p t d | |  i f ‚ t | ƒ p t d | ‚ | |  | <q$ Wn |  i ƒ  d S(   s²   
        @param domain: the domain of discourse
        @type domain: C{set}
        @param assign: a list of (varname, value) associations
        @type assign: C{list}
        s   '%s' is not in the domain: %ss-   Wrong format for an Individual Variable: '%s'N(   R   R.   RE   R*   t	   is_indvart   _addvariant(   R2   RE   t   assignt   varR5   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR.   ¯   s    	 c         C   s2   | |  j o t  i |  | ƒ Sn t d | ‚ d  S(   Ns"   Not recognized as a variable: '%s'(   R   R7   R   (   R2   R8   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR7   Á   s    c         C   s    t  |  i ƒ } | i |  ƒ | S(   N(   RG   RE   t   update(   R2   R%   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   copyÇ   s    c         C   s4   | o |  | } |  | =n |  i  ƒ  |  i ƒ  t S(   s»   
        Remove one or all keys (i.e. logic variables) from an
        assignment, and update C{self.variant}.

        @param var: a Variable acting as a key for the assignment.
        (   t   clearRI   R   (   R2   RK   R5   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   purgeÌ   s    


c         C   s8   d } x+ |  i  D]  \ } } | d | | f 7} q W| S(   sQ   
        Pretty printing for assignments. {'x', 'u'} appears as 'g[u/x]'
        t   gs   [%s/%s](   t   variant(   R2   t   gstringR5   RK   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR9   Û   s
    
 c         C   sK   g  } x5 |  i  ƒ  D]' } | d | d f } | i | ƒ q W| |  _ t S(   sK   
        Create a more pretty-printable version of the assignment.
        i   i    (   R   R;   RQ   R   (   R2   R'   R   t   pair(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyRI   ä   s     	c         C   sZ   | |  i  j p t d | |  i  f ‚ t | ƒ p t d | ‚ | |  | <|  i ƒ  |  S(   sg   
        Add a new variable-value pair to the assignment, and update
        C{self.variant}.

        s   %s is not in the domain %ss-   Wrong format for an Individual Variable: '%s'(   RE   R*   RH   RI   (   R2   RK   R5   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR#   ï   s    

(   R   R   RC   R   R.   R7   RM   RO   R9   RI   R#   (    (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyRG       s   					t   Modelc           B   s\   e  Z d  Z d „  Z d „  Z d „  Z e d „ Z e d „ Z e	 d „ Z
 e d d „ Z RS(	   sù   
    A first order model is a domain M{D} of discourse and a valuation M{V}.

    A domain M{D} is a set, and a valuation M{V} is a map that associates
    expressions with values in the model.
    The domain of M{V} should be a subset of M{D}.
    c         C   sZ   t  | t ƒ p t ‚ | |  _ | |  _ | i | i ƒ p t d | i | f ‚ n d S(   s›  
        Construct a new L{Model}.
        
        @type domain: C{set}
        @param domain: A set of entities representing the domain of discourse of the model.
        @type valuation: L{Valuation}
        @param valuation: the valuation of the model.
        @param prop: If this is set, then we are building a propositional        model and don't require the domain of M{V} to be subset of M{D}.
        sD   The valuation domain, %s, must be a subset of the model's domain, %sN(   R   R   R*   RE   t	   valuationt
   issupersetR   (   R2   RE   RU   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR.     s    		c         C   s   d |  i  |  i f S(   Ns   (%r, %r)(   RE   RU   (   R2   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   __repr__  s    c         C   s   d |  i  |  i f S(   Ns   Domain = %s,
Valuation = 
%s(   RE   RU   (   R2   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyR9     s    c         C   s   yV t  ƒ  } | i | ƒ } |  i | | d | ƒ} | o Hd | | | f GHn | SWn2 t j
 o& | o Hd | | f GHn d Sn Xd S(   sg  
        Call the L{LogicParser} to parse input expressions, and
        provide a handler for L{satisfy}
        that blocks further propagation of the C{Undefined} error.
        @param expr: An C{Expression} of L{logic}.
        @type g: L{Assignment}
        @param g: an assignment to individual variables.
        @rtype: C{bool} or 'Undefined'
        R   s    '%s' evaluates to %s under M, %ss   '%s' is undefined under M, %sR   N(   t   LogicParsert   parset   satisfyR   (   R2   t   exprRP   R   t   lpt   parsedt   value(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   evaluate   s    
	c         C   sk  t  | t ƒ o« | i ƒ  \ } } t  | t ƒ oS |  i | | ƒ } t g  } | D] } | |  i | | ƒ qR ~ ƒ }	 |	 | j Sqg|  i | i | ƒ } |  i | i | ƒ }
 | |
 Sn­t  | t ƒ o |  i | i	 | ƒ Sn…t  | t
 ƒ o- |  i | i | ƒ o |  i | i | ƒ SnHt  | t ƒ o- |  i | i | ƒ p |  i | i | ƒ Snt  | t ƒ o. |  i | i | ƒ p |  i | i | ƒ SnÍt  | t ƒ o, |  i | i | ƒ |  i | i | ƒ j Sn‘t  | t ƒ o, |  i | i | ƒ |  i | i | ƒ j SnUt  | t ƒ o\ | i ƒ  } xE |  i D]: } | i | i i | ƒ |  i | i	 | ƒ p t Sq9q9Wt Sné t  | t ƒ o\ | i ƒ  } xE |  i D]: } | i | i i | ƒ |  i | i	 | ƒ o t Sq¥q¥Wt Sn} t  | t ƒ oY h  } | i i } x< |  i D]1 } |  i | i	 | i | | ƒ ƒ } | | | <qW| Sn |  i | | | ƒ Sd S(   s  
        Recursive interpretation function for a formula of first-order logic.

        Raises an C{Undefined} error when C{parsed} is an atomic string
        but is not a symbol or an individual variable.

        @return: Returns a truth value or C{Undefined} if C{parsed} is        complex, and calls the interpretation function C{i} if C{parsed}        is atomic.
        
        @param parsed: An expression of L{logic}.
        @type g: L{Assignment}
        @param g: an assignment to individual variables.
        N(   R   t   ApplicationExpressiont   uncurryt   AbstractVariableExpressionRZ   R   t   functiont   argumentt   NegatedExpressiont   termt   AndExpressiont   firstt   secondt   OrExpressiont   ImpExpressiont   IffExpressiont   EqualityExpressiont   AllExpressionRM   RE   R#   t   variablet   namet   FalseR   t   ExistsExpressiont   LambdaExpressiont   i(   R2   R]   RP   R   Rc   t	   argumentst   funvalR   t   argt   argvalst   argvalt   new_gt   ut   cfRK   R5   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyRZ   9  sf    3
 
 
 !c         C   sa   | i  i |  i i j o |  i | i  i Sn0 t | t ƒ o | | i  i Sn t d | ‚ d S(   sË  
        An interpretation function.

        Assuming that C{parsed} is atomic:

         - if C{parsed} is a non-logical constant, calls the valuation M{V} 
         - else if C{parsed} is an individual variable, calls assignment M{g}
         - else returns C{Undefined}.

        @param parsed: an C{Expression} of L{logic}.
        @type g: L{Assignment}
        @param g: an assignment to individual variables.
        @return: a semantic value
        s   Can't find a value for %sN(   Ro   Rp   RU   RF   R   t   IndividualVariableExpressionR   (   R2   R]   RP   R   (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyRt   ƒ  s
    i    c         C   sˆ  d } | | | } g  } t  | t ƒ o t | ƒ }	 n | }	 |	 | i ƒ  j o| o H| | d | | f GHn xÛ |  i D]Ð }
 | i ƒ  } | i |	 i |
 ƒ | d j o | d } n d } |  i | | | ƒ } | o | d | GHn | t	 j o" | o | d | | f GHqPq€ | i
 |
 ƒ | o | d | | | f GHq€ q€ Wt d „  | Dƒ ƒ } n t d	 |	 i | f ‚ | S(
   s²  
        Generate the entities from the model's domain that satisfy an open formula.

        @param parsed: an open formula
        @type parsed: L{Expression}
        @param varex: the relevant free individual variable in C{parsed}.
        @type varex: C{VariableExpression} or C{str}
        @param g: a variable assignment
        @type g:  L{Assignment}
        @return: a C{set} of the entities that satisfy C{parsed}.
        s      s'   Open formula is '%s' with assignment %si   i    s   (trying assignment %s)s   value of '%s' under %s is Falses   value of '%s' under %s is %sc         s   s   x |  ] } | Vq Wd  S(   N(    (   t   .0t   c(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pys	   <genexpr>Î  s    s   %s is not free in %s(   R   R"   t   Variablet   freeRE   RM   R#   Rp   RZ   Rq   R;   R   R   (   R2   R]   t   varexRP   R   t   nestingt   spacert   indentt
   candidatesRK   R{   Rz   t   lowtraceR^   t   result(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt
   satisfiers  s:    
 (   R   R   RC   R.   RW   R9   R   R_   RZ   Rq   Rt   R‰   (    (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyRT   þ   s   			Ji   c         C   s  t  d t f d t f d t f g ƒ a t g  ƒ a t t t ƒ a t t ƒ a	 Hd t
 GHd GHd t
 GHd GHHd Gt GHd t
 GHd d	 d
 d d d d d d d d d d d d d d g } xH | D]@ } |  o Ht i | t	 |  ƒ q¾ d | t i | t	 ƒ f GHq¾ Wd S(   s!   Example of a propositional model.t   Pt   Qt   RR   s   Propositional Formulas Demos7   (Propositional constants treated as nullary predicates)s
   Model m1:
s   (P & Q)s   (P & R)s   - Ps   - Rs   - - Ps	   - (P & R)s   (P | R)s   (R | P)s   (R | R)s	   (- P | R)s	   (P | - P)s   (P -> Q)s   (P -> R)s   (R -> P)s	   (P <-> P)s	   (R <-> R)s	   (P <-> R)s   The value of '%s' is: %sN(   R,   R   Rq   t   val1R   t   dom1RT   t   m1RG   t   g1t   multR_   (   R   t	   sentencest   sent(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   propdemoá  sF    '					 c            s1  d d d  d t  d d g ƒ f d	 t  d d
 g ƒ f d t  d g ƒ f d t  d! d" d# d$ g ƒ f g a t t ƒ a t i a t t t ƒ a t t d% d& g ƒ a	 |  p‡Hd t
 GHd GHd t
 GHd Gd' Gd Gt GHd Gt	 GHd d	 d d d d d g } t ƒ  ‰  g  } | D] } | ˆ  i | ƒ q~ } HxL | D]D } y d | t i | t	 ƒ f GHWq.t j
 o d | GHq.Xq.Wd( d d) f d d* f d d+ f g } x | D]„ \ } }	 yS t i ˆ  i | ƒ t	 ƒ }
 t ‡  f d †  |	 Dƒ ƒ } d | |	 | |
 j f GHWq¡t j
 o d | |	 f GHq¡Xq¡Wn d S(,   s   Example of a first-order model.t   adamt   b1t   bettyR   t   fidot   d1t   girlt   g2t   boyt   b2t   dogt   lovet   xt   yR   s   Models Demos
   Model m2:
t   -i   s   
s   Variable assignment = t   walkst   zs&   The interpretation of '%s' in m2 is %ss-   The interpretation of '%s' in m2 is Undefinedc         3   s.   x' |  ]  } t  i ˆ  i | ƒ t ƒ Vq Wd  S(   N(   t   m2Rt   RY   R›   (   R~   Rw   (   R\   (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pys	   <genexpr>6  s    s   %s(%s) evaluates to %ss   %s(%s) evaluates to UndefinedN(   R•   s   b1(   R—   s   g1(   s   fidos   d1(   s   b1s   g1(   s   b2s   g2(   s   g1s   b1(   s   g2s   b1(   R    s   b1(   R¡   s   g2s   --------------(   s   boyR•   (   R•   (   R•   R¡   (   R¡   R•   (   R   t   v2R,   t   val2RE   t   dom2RT   R¥   RG   R›   R‘   RX   RY   Rt   R   R   (   t   quietR   t   exprsR   t   et   parsed_exprsR]   t   applicationst   funR   Rv   t   argsval(    (   R\   s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   folmodel  sB    	<!					* $ c         C   s¹   t  d t ƒ Hd t GHd GHd t GHd d d d d d	 d
 d d d d d d d d d d d g } xQ | D]I } t i ƒ  |  o t i | t |  ƒ qh d | t i | t ƒ f GHqh Wd S(   sF   
    Interpretation of closed expressions in a first-order model.
    R©   R   s   FOL Formulas Demos   love (adam, betty)s   (adam = mia)s   \x. (boy(x) | girl(x))s   \x. boy(x)(adam)s   \x y. love(x, y)s   \x y. love(x, y)(adam)(betty)s   \x y. love(x, y)(adam, betty)s   \x y. (boy(x) & love(x, y))s#   \x. exists y. (boy(x) & love(x, y))s   exists z1. boy(z1)s!   exists x. (boy(x) &  -(x = adam))s&   exists x. (boy(x) & all y. love(y, x))s   all x. (boy(x) | girl(x))s1   all x. (girl(x) -> exists y. boy(y) & love(x, y))s3   exists x. (boy(x) & all y. (girl(y) -> love(y, x)))s3   exists x. (boy(x) & all y. (girl(y) -> love(x, y)))s   all x. (dog(x) -> - girl(x))s-   exists x. exists y. (love(x, y) & love(x, y))s   The value of '%s' is: %sN(   R°   R   R‘   R›   RO   R¥   R_   (   R   t   formulast   fmla(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   foldemo>  s:    			 
c         C   s
  Hd t  GHd GHd t  GHt d t ƒ d d d d d d	 d
 d d d d d d d d d d d d g } |  o	 t GHn t ƒ  } x  | D] } | GH| i | ƒ q„ Wg  } | D] } | | i | ƒ q« ~ } x9 | D]1 } t i ƒ  d | t i | d t |  ƒ f GHqÑ Wd S(   s5   Satisfiers of an open formula in a first order model.R   s   Satisfiers DemoR©   s   boy(x)s   (x = x)s   (boy(x) | girl(x))s   (boy(x) & girl(x))s   love(adam, x)s   love(x, adam)s   -(x = adam)s   exists z22. love(x, z22)s   exists y. love(y, x)s   all y. (girl(y) -> love(x, y))s   all y. (girl(y) -> love(y, x))s)   all y. (girl(y) -> (boy(x) & love(y, x)))s)   (boy(x) & all y. (girl(y) -> love(x, y)))s)   (boy(x) & all y. (girl(y) -> love(y, x)))s+   (boy(x) & exists y. (girl(y) & love(y, x)))s   (girl(x) -> dog(x))s   all y. (dog(y) -> (x = y))s&   exists y. (love(adam, y) & love(y, x))s   The satisfiers of '%s' are: %sR    N(	   R‘   R°   R   R¥   RX   RY   R›   RO   R‰   (   R   R±   R\   R²   R   R]   t   p(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   satdemoj  sH    					 * 
i    c         C   s{   h  t  d <t d <t d <t d <} y | |  d | ƒ Wn5 t j
 o) x$ | D] }  | |  d | ƒ qW Wn Xd S(   sO  
    Run exists demos.

     - num = 1: propositional logic demo
     - num = 2: first order model demo (only if trace is set)
     - num = 3: first order sentences demo
     - num = 4: satisfaction of open formulas demo
     - any other value: run all the demos

    @param trace: trace = 1, or trace = 2 for more verbose tracing
    i   i   i   i   R   N(   R”   R°   R³   Rµ   t   KeyError(   t   numR   t   demos(    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pyt   demo™  s    			 t   __main__i   R   (    RC   t   pprintR    R	   R0   t   nltk.decoratorsR   t   nltk.internalsR   t   logict	   ExceptionR   R   R   R!   R&   R)   Rq   R+   R   R,   RG   t   objectRT   R‘   R   R”   R°   R³   Rµ   R¹   R   (    (    (    s'   /p/zhu/06/nlp/nltk/nltk/sem/evaluate.pys   <module>   s2   
					
	7^ß/.,/