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

您好如何在摘要生成时使用自定义的训练集呢 #10

Open
hommy112 opened this issue Jan 12, 2020 · 1 comment
Open

您好如何在摘要生成时使用自定义的训练集呢 #10

hommy112 opened this issue Jan 12, 2020 · 1 comment

Comments

@hommy112
Copy link

我是一个新手参照您的dev_path = '../data/ts/test.sample.tsv'下的格式生成了训练集但是会报错属性缺失如下:
File "/Users/hanyang/Downloads/lightNLP-master/examples/test_ts.py", line 20, in
log_dir='/Users/hanyang/Desktop')
File "/Users/hanyang/Downloads/lightNLP-master/lightnlp/tg/ts/module.py", line 31, in train
word_vocab = ts_tool.get_vocab(train_dataset, dev_dataset)
File "/Users/hanyang/Downloads/lightNLP-master/lightnlp/tg/ts/tool.py", line 41, in get_vocab
TEXT.build_vocab(*dataset)
File "/Users/hanyang/Library/Python/3.7/lib/python/site-packages/torchtext/data/field.py", line 298, in build_vocab
for x in data:
File "/Users/hanyang/Library/Python/3.7/lib/python/site-packages/torchtext/data/dataset.py", line 154, in getattr
yield getattr(x, attr)
AttributeError: 'Example' object has no attribute 'summarization'

@hommy112
Copy link
Author

请问我应该如何生成一个可用的训练集呢

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

1 participant