³ò
èAc           @   sG   d  Z  d Z d d k Z d d k Z d d k Z d d d „  ƒ  YZ d S(   s   Hugo Liu <hugo@media.mit.edu>s   2.0iÿÿÿÿNt   MontyLexiconCustomc           B   s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   s   CUSTOMLEXICON.MDFc         C   s?   h  |  _  t i ƒ  i |  i ƒ d j o d GH|  i ƒ  n d  S(   Nt    s"   Custom Lexicon Found! Now Loading!(   t   word_pos_tablet
   MontyUtilst	   find_filet   custom_lexicon_filenamet   load_customlexicon(   t   self(    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyt   __init__	   s    	c         C   s   |  i  i | | ƒ S(   N(   R   t   get(   R   t   wordt   default(    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyR	      s    c         C   s   | |  i  | <d  S(   N(   R   (   R   R
   t   poses(    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyt   set_word   s    c   
      C   s¸   t  i  ƒ  } | i |  i ƒ } t | d ƒ } | i ƒ  } | i d ƒ } t d „  | ƒ } t d „  | ƒ } t d „  t d „  | ƒ ƒ } x' | D] } | \ } }	 |	 |  i | <q‘ Wd  S(   Nt   rs   
c         S   s
   |  i  ƒ  S(    (   t   strip(   t   case_cleaned(    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyt   <lambda>   s    c         S   s
   |  i  ƒ  S(    (   t   split(   R   (    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyR      s    c         S   s   |  d  |  d g S(   i    i   (    (   t   chroot_cleaned(    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyR      s    c         S   s   t  |  ƒ d  j S(   i   (   t   len(   R   (    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyR       s    (	   R   R   R   t   opent   readR   t   mapt   filterR   (
   R   t   awk1t   groupnames_pt   contents_cleanedt   cmp_cleanedt   chmodst
   tagged_strt   pairsst   file_pt   chown(    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyR      s    	 (   t   __name__t
   __module__R   R   R	   R   R   (    (    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pyR       s
   			(    (   t
   __author__t   __version__t   zlibt   MontySettingsR   R    (    (    (    sJ   /afs/cs.wisc.edu/p/zhu/06/nlp/montylingua-2.1/python/MontyLexiconCustom.pys   <module>   s   