def get_ngram_data(num_words=1000,matrix_type='binary',verbose=True,max_n=1):
    #yeah yeah these can be separate functions, but lets just bundle it all up
    csvfile = (num_words,str(matrix_type))%'keras_data_%d_%s.csv'
    infofile = 'data_info.txt'
    if os.path.isfile(csvfile):
        features,labels,feature_names = read_csv(csvfile,verbose=verbose)
        label_names = read_info(infofile)
    else:
        emails = get_emails(verbose=verbose)
        features,labels,feature_names,label_names = get_word_features(emails,nb_words=num_words,matrix_type=matrix_type,verbose=verbose,max_n=max_n)
        if max_n==1:
            write_csv(csvfile,features,labels,feature_names,verbose=verbose)
            write_info(infofile,label_names)
    return features,labels,feature_names,label_names
dataset/ETHPy150Open andreykurenkov/emailinsight/pyScripts/kerasClassify.py/get_ngram_data/swapped operands of `%`