Closed realMoana closed 3 years ago
content_words
is the "cutting words" key in datasets' json. And we got the content_words
by Line58-67 in input_of_emotions.py
. You can check the path code/preprocess/data/Weibo-16
to see whether the preprocessed train.json
, val.json
, and test.json
exist.
I'm not sure whether you modify the input_of_emotions.py
but it seems that your trackback
File "input_of_emotions.py", line 66, in
emotion_arr = [extract_pkg.extract_dual_emotion(p) for p in tqdm(pieces)]
is different from the Line 66 of the source code.
Thank you for your reply. I'll check it.
When I run input_of_emotions.oy, I get an error: -------------------- [2021-09-27 19:33:57] Processing the dataset: Weibo-16 --------------------
50%|████████████████████████████████████████████████████████████████████████████▌ | 1/2 [00:00<00:00, 5.63it/s]T raceback (most recent call last): File "input_of_emotions.py", line 66, in
emotion_arr = [extract_pkg.extract_dual_emotion(p) for p in tqdm(pieces)]
File "input_of_emotions.py", line 66, in
emotion_arr = [extract_pkg.extract_dual_emotion(p) for p in tqdm(pieces)]
File "../emotion\extract_emotion_ch.py", line 294, in extract_dual_emotion
piece['content'], piece['content_words'], piece['content_emotions'])
KeyError: 'content_words'
50%|████████████████████████████████████████████████████████████████████████████▌ | 1/2 [00:00<00:00, 3.92it/s]
I don't know how to deal with it.