(self, filePath)
Save vocabulary a offline file
        
        Args:
            filePath: where you want to save your vocabulary, every line in the 
            file represents a word with a tab seperating word and it's frequency
            
        Returns:
            None
Save vocabulary a offline file
        
        Args:
            filePath: where you want to save your vocabulary, every line in the 
            file represents a word with a tab seperating word and it's frequency
            
        Returns:
            None
Save vocabulary a offline file Args : filePath : where you want to save your vocabulary every line in the file represents a word with a tab seperating word and it s frequency Returns : None
def save_vocab(self, filePath):
        """
        Save vocabulary a offline file
        
        Args:
            filePath: where you want to save your vocabulary, every line in the 
            file represents a word with a tab seperating word and it's frequency
            
        Returns:
            None 
        """
        self.word_freq.pop(self.unknown)
        sorted_tup = sorted(self.word_freq.items(), key=operator.itemgetter(1))
        sorted_tup.reverse()
        with open(filePath, 'wb') as fd:
            for (word, freq) in sorted_tup:
                fd.write(('%s\t%d\n'%(word, freq)).encode('utf-8'))
def save_vocab ( self , filePath ) : self . word_freq . pop ( self . unknown ) sorted_tup = sorted ( self . word_freq . items ( ) , key = operator . itemgetter ( 1 ) ) sorted_tup . reverse ( ) with open ( filePath , 'wb' ) as fd : for ( word , freq ) in sorted_tup : fd . write ( ( '%s\t%d\n' % ( word , freq ) ) . encode ( 'utf-8' ) )