code: def addPattern(self, word, vector):
          
          if word in self.patterns:
              raise NetworkError('Pattern key already in use. Call delPattern to free key.', word)
          else:
              self.patterns[word] = vector
docs: Adds a pattern with key word.
  
          Example: net.addPattern("tom", [0, 0, 0, 1])