GithubHelp home page GithubHelp logo

Comments (6)

ZhixiuYe avatar ZhixiuYe commented on September 24, 2024

先解压NYT_data.zip文件 unzip NYT_data/NYT_data.zip

from intra-bag-and-inter-bag-attentions.

Thoye avatar Thoye commented on September 24, 2024

嗯嗯,是的解压了,就是自己 bash precess.sh 的时候,报错了,帮忙看看,谢谢!
Init Begin.
wordTotal= 114042
Word dimension= 50
preprocess.sh: line 2: 12694 Segmentation fault (core dumped) ./extract
bags_train.txt
Traceback (most recent call last):
File "data2pkl.py", line 83, in
data2pickle('bags_train.txt','train_temp.pkl',1)
File "data2pkl.py", line 75, in data2pickle
data = readData(input, mode)
File "data2pkl.py", line 20, in readData
f = codecs.open(filename, 'r')
File "/home/mrc/anaconda3/envs/env3/lib/python3.6/codecs.py", line 895, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: 'bags_train.txt'
load test and train raw data...
Traceback (most recent call last):
File "pickledata.py", line 236, in
testData = pickle.load(open('test_temp.pkl', 'rb'), encoding='utf-8')
FileNotFoundError: [Errno 2] No such file or directory: 'test_temp.pkl'
rm: cannot remove 'temp': No such file or directory

from intra-bag-and-inter-bag-attentions.

Thoye avatar Thoye commented on September 24, 2024

extract.cpp中267行,fout.open(("word2id.txt"),ios::out);但是也没有这个word2id.txt文件。

from intra-bag-and-inter-bag-attentions.

ZhixiuYe avatar ZhixiuYe commented on September 24, 2024
  1. 确定文件结构是下面这样的
Intra-Bag-and-Inter-Bag-Attentions
|-- figure
    |-- CNNmethods.pdf
    |-- PCNNmethods.pdf
|-- model
    |-- embedding.py
    |-- model_bagatt.py
    |-- pcnn.py
|-- NYT_data
    |-- relation2id.txt
    |-- test.txt
    |-- train.txt
    |-- vec.bin
|-- preprocess
    |-- data2pkl.py
    |-- extract.cpp
    |-- pickledata.py
    |-- preprocess.sh
|-- plot.py
|-- README.md
|-- train.py
  1. 在preprocess文件夹下执行的bash preprocess.sh
    cd preprocess; bash preprocess.sh; cd ..

from intra-bag-and-inter-bag-attentions.

WoodPecker1111 avatar WoodPecker1111 commented on September 24, 2024

你可以单独运行extract.cpp文件获得那些pkl文件,再手动运行data2pkl和pkl2data就可以了

from intra-bag-and-inter-bag-attentions.

Fengzhu-xu avatar Fengzhu-xu commented on September 24, 2024

你可以单独运行extract.cpp文件获得那些pkl文件,再手动运行data2pkl和pkl2data就可以了

请问怎么单独运行呢,用什么?

from intra-bag-and-inter-bag-attentions.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.