Imagine we have a global variable dictionary that looks like this :

{   { cat, "a small mammal"},
     {dog,"barks a lot"},
     {ant, "sneaky little bug},
  }
  
  Then the addWord method can just append to this list, 
  and the lookup method can look down the list until we find it.

dictionary = {};     
addWord[name_, definition_] := 
        Method[{}, 
dictionary  =  
            Append[dictionary, {name, definition}]; 
  
];
word[i_] := dictionary[[i]][[1]];    
definition[
          i_] := dictionary[[i]][[2]];
\(\(lookup[name_] := 
        Module[{}, 
answer = ""; 
Do[
If[\ \ word[i]\  == \ name, \ \ answer = \ 
                definition[i]\ \ ]
, {i, 1, 
              Length[dictionary]}
]; 
If[\ answer == "", 
 (*then*) \ \ Return["Oops - not in dictionary."], \ 
 (*else*) \ 
            Return[answer]
];
];\)\)

addWord[cat,  "likes to purr"];
addWord[dog,  "barks at cars"];
addWord[ant,  "sneaky little bug"];

dictionary

word[1]

word[2]

definition[1]

lookup[dog]

lookup[bug]