code: def _sentence(self, words):
          
          db = self.database
  
          # Generate 2 words to start a sentence with
          seed = random.randint(0, db['word_count'] - 3)
          seed_word, next_word = db['words'][seed], db['words'][seed + 1]
          w1, w2 = seed_word, next_word
  
          # Generate the complete sentence
          sentence = []
          for i in range(0, words - 1):
              sentence.append(w1)
              w1, w2 = w2, random.choice(db['freqs'][(w1, w2)])
          sentence.append(w2)
  
          # Make the sentence respectable
          sentence = ' '.join(sentence)
  
          # Capitalize the sentence
          sentence = sentence.capitalize()
  
          # Remove additional sentence ending puntuation
          sentence = sentence.replace('.', '')
          sentence = sentence.replace('!', '')
          sentence = sentence.replace('?', '')
          sentence = sentence.replace(':', '')
  
          # Remove quote tags
          sentence = sentence.replace('.', '')
          sentence = sentence.replace('!', '')
          sentence = sentence.replace('?', '')
          sentence = sentence.replace(':', '')
          sentence = sentence.replace('"', '')
  
          # If the last character is not an alphanumeric remove it
          sentence = re.sub('[^a-zA-Z0-9]$', '', sentence)
  
          # Remove excess space
          sentence = re.sub('\s+', ' ', sentence)
  
          # Add a full stop
          sentence += '.'
  
          return sentence
docs: Generate a sentence