
    Mg	                         S SK r S SKJr  S SKJr  \ R                  R
                  R                  S5        \" S5      S 5       rg)    N)wordnet)pluginzjarviscli/data/ntlk
dictionaryc                   ^ ^^ [        U5      S:X  a"  T R                  S5        T R                  5       nOUn[        R                  " U5      m[        T5      S:X  a  T R                  S5        g[        5       n[        5       nSnT H  nUS-   nT R                  SR                  XVR                  5       5      5        UR                  5        Hl  nUR                  5       U:w  a  UR                  UR                  5       5        UR                  5        H"  nUR                  UR                  5       5        M$     Mn     M     T R                  SSR                  U5      -   5        T R                  S	SR                  U5      -   5        UU U4S
 jmT" 5       n	U	Gb  TU	S-
     nUR                  5        Vs/ s H  nXr:w  d  M
  UPM     nnUR                  5       n
[        5       nUR                  5        H9  nUR                  5        H"  nUR                  UR                  5       5        M$     M;     T R                  S5        T R                  SR                  U	5      5        T R                  SR                  UR                  5       5      5        [        U5      S:  a/  T R                  SR                  SR                  U5      5      5        [        U5      S:  a/  T R                  SR                  SR                  U5      5      5        [        U
5      S:  ab  [        U
5      S:X  a$  T R                  SR                  U
S   5      5        O/T R                  SR                  SR                  U
5      5      5        T" 5       n	U	b  GM  ggs  snf )z.
Get meaning, synonym and antonym of any word
r   z
Enter wordzDon't recognise that wordN   z	{:>3}. {}z
Synonyms:
z, z
Antonyms:
c                  8  > TR                  S5        [        T5      n TR                  SR                  U 5      5      nUS:X  a  g  [	        U5      nUS::  d  X:  a'  TR                  SR                  U 5      5        T" 5       $ U$ ! [
         a
    T" 5       s $ f = f)N zDetails of meaning (1-{}): ? r   zChoose Value between 1 and {})sayleninputformatint
ValueError)synlen	detail_idinput_detail_idjarvissynss     @/Users/admin/workspace/ai/Jarvis/jarviscli/plugins/dictionary.pyr   #dictionary.<locals>.input_detail_id*   s    

2TLL!@!G!G!OP	?	%II >Y/JJ6==fEF"$$  	%"$$	%s   B BBr	   z	== {}. ==zMeaning  : {}zSynonyms : {}zAntonyms : {}zExamples : {}zExamples :
-{}z
- )r   r
   r   r   synsetssetr   
definitionlemmasnameaddantonymsjoinlemma_namesexamples)r   swordsynonymsr   countmeaningsynonymantonymr   r    r   r   s   `          @@r   r   r      s   
 1v{

>"||~??4 D
4yA~

./uHuHE	

;%%e-?-?-ABC~~'G||~%W\\^,"++-W\\^, . (	  JJ8!445
JJ8!445$  !I

y1}%+2+>+>+@ (+@ +@ (##%5~~'G"++-W\\^, . ( 	

2

;%%i01

?))'*<*<*>?@x=1JJ--dii.ABCx=1JJ--dii.ABCx=18}!

?11(1+>?

,33FKK4IJK#%	3 
(s   3	N
 N
)nltknltk.corpusr   r   datapathappendr        r   <module>r/      s@       		  + , M& M&r.   