def set_n_gram(self, value):
        ''' setter '''
        if isinstance(value, Ngram):
            self.__n_gram = value
        else:
            raise TypeError("The type of n_gram must be Ngram.")
setter