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

头实体和候选实体集path问题 #21

Open
daxian-lh opened this issue Aug 26, 2024 · 3 comments
Open

头实体和候选实体集path问题 #21

daxian-lh opened this issue Aug 26, 2024 · 3 comments

Comments

@daxian-lh
Copy link

大佬,您在MindMap.py中,main方法里match_kg.append(match_kg_i.replace(" ",""))。而在find_shortest_path方法中,使用了entities[i].replace(""," "),这不是会导致路径中的实体无法在候选集中匹配嘛(一个实体中有下划线,一个实体中无下划线),是不是在find_shortest_path中,不需要进行entities[i].replace("_"," ")这一步的操作呀

@wyl-willing
Copy link
Owner

wyl-willing commented Aug 26, 2024 via email

@daxian-lh
Copy link
Author

match_kg: ['Sharp_abdominal_pain', 'Nausea', 'Vomiting', 'Difficulty_eating']

entities: ['Sharp_abdominal_pain', 'Poisoning_due_to_ethylene_glycol', 'Nausea']
entities: ['Sharp_abdominal_pain', 'Pyelonephritis', 'Nausea']
entities: ['Sharp_abdominal_pain', 'Choledocholithiasis', 'Nausea']
entities: ['Sharp_abdominal_pain', 'Problem_during_pregnancy', 'Nausea']
entities: ['Sharp_abdominal_pain', 'Acute_pancreatitis', 'Nausea']
entities: ['Sharp_abdominal_pain', 'Volvulus', 'Nausea']
entities: ['Sharp_abdominal_pain', 'Infectious_gastroenteritis', 'Nausea']

这是我打印出来的,match_kg是您匹配到的实体,entities是图谱中的实体,您在寻找最短路径的代码中将”_“转成了空格,这样是不是会导致entities中的实体匹配不上候选集中的实体呀。

我个人实在是想不通,可能上面提的问题过于简单了,希望大佬能为我解答一下,非常感谢

@wyl-willing
Copy link
Owner

wyl-willing commented Aug 26, 2024 via email

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

3 participants
@wyl-willing @daxian-lh and others