Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: 'data_for_joint/train.sent' #6

Open
Time-jj opened this issue Nov 12, 2022 · 2 comments

Comments

@Time-jj
Copy link

Time-jj commented Nov 12, 2022

File "F:/project/CAIL2022/xxcq/baseline/main.py", line 469, in
train_examples = processor.get_train_examples('train.sent','train.pointer','train.ner',datatype=datatype)
File "F:\project\CAIL2022\xxcq\baseline\data_load_joint.py", line 83, in get_train_examples
alltext, tag_label, nertag, spantag = self._read_files(os.path.join(self.data_dir, filename),
File "F:\project\CAIL2022\xxcq\baseline\data_load_joint.py", line 141, in _read_files
fin = open(path, 'r', encoding='utf-8')
信息抽取(xxcq)条目,运行基线模型报错,没有train.sent等文件,在项目中确实没找到相关文件,请问这个问题怎么解决?是否是我的项目运行顺序有误,xxcq栏目python文件该如何运行呢?

@ChristmasLatte
Copy link

File "F:/project/CAIL2022/xxcq/baseline/main.py", line 469, in train_examples = processor.get_train_examples('train.sent','train.pointer','train.ner',datatype=datatype) File "F:\project\CAIL2022\xxcq\baseline\data_load_joint.py", line 83, in get_train_examples alltext, tag_label, nertag, spantag = self._read_files(os.path.join(self.data_dir, filename), File "F:\project\CAIL2022\xxcq\baseline\data_load_joint.py", line 141, in _read_files fin = open(path, 'r', encoding='utf-8') 信息抽取(xxcq)条目,运行基线模型报错,没有train.sent等文件,在项目中确实没找到相关文件,请问这个问题怎么解决?是否是我的项目运行顺序有误,xxcq栏目python文件该如何运行呢?

baseline/data_for_joint文件夹里有相应的ipynb文件,需要先执行里面的内容,生成相应的train.sent等

@Time-jj
Copy link
Author

Time-jj commented Nov 27, 2022

感谢,确实是需要先运行ipynb文件,不过在运行文件的过程中又遇到一个问题。data_handle.ipynb文件对训练集和测试集进行了处理。官方给出的测试集json文件只有一个属性,就是文本。给出的训练集文件中有多个属性。但是data_handle.ipynb对测试集的处理和对训练集是一样的,请问怎么解决呢
image
image
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants