Skip to content

Instantly share code, notes, and snippets.

@ratsgo
ratsgo / news_seq2seq.py
Created March 12, 2017 10:58
news seq2seq model
import tensorflow as tf
import numpy as np
import tool as tool
import time
# data loading
data_path = 'C:/newscorpus.csv'
title, contents = tool.loading_data(data_path, eng=False, num=False, punc=False)
word_to_ix, ix_to_word = tool.make_dict_all_cut(title+contents, minlength=0, maxlength=3, jamo_delete=True)