Read data

This commit is contained in:
Maciej Sobkowiak 2021-06-21 21:10:27 +02:00
parent 1397a7a5c2
commit 37da463746

21
seq.py Normal file
View File

@ -0,0 +1,21 @@
import pandas as pd
import numpy as np
import gensim
import torch
import pandas as pd
import seaborn as sns
from sklearn.model_selection import train_test_split
# Load data
train = pd.read_csv('train/train.tsv', sep='\t', names=['labels', 'document'])
Y_train = train['labels'].values
X_train = train['document'].values
test = pd.read_csv('test-A/in.tsv', sep='\t', names=['document'])
X_test = test['document'].values
dev = pd.read_csv('dev-0/in.tsv', sep='\t', names=['document'])
exp = pd.read_csv('dev-0/expected.tsv', sep='\t', names=['labels'])
X_dev = dev['document'].values
Y_dev = dev['labels'].values