pycl/Code/ngram.py
def serialize(self, filename = "ngrams"):
		"""Dump the ngram model to a file."""
		try:
			if filename == "ngrams":
				filename = filename + str(self.ngrams["__n__"]) + ".p"
			pickle.dump(self.ngrams, open(filename, "w"))
			self.__changed = True
		except Exception, e:
			print "Exception %s" % e
Dump the ngram model to a file.
Dump the ngram model to a file.
Dump the ngram model to a file .
def serialize(self, filename = "ngrams"):
		try:
			if filename == "ngrams":
				filename = filename + str(self.ngrams["__n__"]) + ".p"
			pickle.dump(self.ngrams, open(filename, "w"))
			self.__changed = True
		except Exception, e:
			print "Exception %s" % e
def serialize ( self , filename = "ngrams" ) : try : if filename == "ngrams" : filename = filename + str ( self . ngrams [ "__n__" ] ) + ".p" pickle . dump ( self . ngrams , open ( filename , "w" ) ) self . __changed = True except Exception , e : print "Exception %s" % e
Dump the ngram model to a file.
Dump the ngram model to a file .
"""Dump the ngram model to a file."""
self
filename