PFoodReq icon indicating copy to clipboard operation
PFoodReq copied to clipboard

some bug

Open yueqianhaobo opened this issue 3 years ago • 3 comments

when i run: python build_all_data.py -data_dir ../../data/kbqa_data/ -kb_path ../../data/recipe_kg/recipe_kg.json -out_dir ../data/kbqa Using pre-built vocabs stored in ../data/kbqa

Traceback (most recent call last): File "build_all_data.py", line 63, in train_vec = build_all_data(train_data, kb, entity2id, entityType2id, relation2id, vocab2id, preferred_ans_type=preferred_ans_type, question_field=question_field, kg_augmentation=kg_augmentation) File "/home/haobo/mnt/academic/nutriology/code/PFoodReq-master/BAMnet/src/core/build_data/foodkg/build_data.py", line 277, in build_all_data query, tmp_topic_men = delex_query_topic_ent(query, topic_key_name, each['entities']) File "/home/haobo/mnt/academic/nutriology/code/PFoodReq-master/BAMnet/src/core/build_data/foodkg/build_data.py", line 145, in delex_query_topic_ent ret = process.extract(topic_ent.replace('_', ' '), set(list(zip(*ent_types))[0]), scorer=fuzz.token_sort_ratio) File "src/cpp_process.pyx", line 586, in cpp_process.extract File "src/cpp_process.pyx", line 447, in cpp_process.extract_list TypeError: 'set' object is not subscriptable

yueqianhaobo avatar Mar 05 '21 06:03 yueqianhaobo

thanks

yueqianhaobo avatar Mar 05 '21 06:03 yueqianhaobo

I solved the same problem changing the version of rapidfuzz to 0.5.0 in requirements.txt

TurconiAndrea avatar Apr 20 '21 14:04 TurconiAndrea

Thanks,I meet the same question.

zhostev avatar Jun 30 '21 03:06 zhostev