示例#1
0
文件: sts.py 项目: brmson/dataset-sts
 def load_file(fname, skip_unlabeled=True):
     # XXX: ugly logic
     if 'sick2014' in fname:
         return loader.load_sick2014(fname)
     else:
         return loader.load_sts(fname, skip_unlabeled=skip_unlabeled)
示例#2
0
 def load_file(fname, skip_unlabeled=True):
     # XXX: ugly logic
     if 'sick2014' in fname:
         return loader.load_sick2014(fname)
     else:
         return loader.load_sts(fname, skip_unlabeled=skip_unlabeled)
示例#3
0
import sys
import os
import glob
import pandas as pd
import pickle

sys.path.insert(0,os.path.join(os.getcwd(),"data\\dataset-sts"))


import pysts
from pysts.loader import load_sts


#s0, s1, labels = load_sts("data/dataset-sts/data/sts/semeval-sts/2015/headlines.test.tsv")
s0, s1, labels = load_sts("data/dataset-sts/data/sts/semeval-sts/all\../2012/OnWN.test.tsv")

print(f"Sentence A: {s0[0]}")
print(f"Sentence B: {s1[0]}")
print(f"Label: {labels[0]}")


#%%

#################
#   LOAD STS    #
#################


files = glob.glob("data/dataset-sts/data/sts/semeval-sts/all/*.test.tsv")
#files = glob.glob("dataset-sts/data/sts/semeval-sts/2015/head*.test.tsv")