Skip to content
New issue

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

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

Already on GitHub? # to your account

some bug #1

Open
yueqianhaobo opened this issue Mar 5, 2021 · 3 comments
Open

some bug #1

yueqianhaobo opened this issue Mar 5, 2021 · 3 comments

Comments

@yueqianhaobo
Copy link

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
Copy link
Author

thanks

@TurconiAndrea
Copy link

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

@zhostev
Copy link

zhostev commented Jun 30, 2021

Thanks,I meet the same question.

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

No branches or pull requests

3 participants