microsoft / KC

Knowledge Computing group - MSRA
MIT License
84 stars 20 forks source link

[TIARA] relation_trie start #30

Closed midannii closed 1 year ago

midannii commented 1 year ago

Hi.

I want to know the reason why initial self.relation_start is self.class_trie.query_child([]), not self.relation_trie.query_child([]) (TIARA/src/algorithm/grailqa_s_expression_checker.py, line

I'm curious the reason because I intuitively think it's right to get the startpoint of relation_trie from self.relation_trie.

yhshu commented 1 year ago

Hi, Your intuition is right. Of course you can modify that to relation_trie as the initial state. But for Freebase, relation starts with a class as the prefix, and what depends which trie to work is in this line: https://github.com/microsoft/KC/blob/cda6192dc2cc89727ce790de1f2fb243648d4f9e/papers/TIARA/src/algorithm/grailqa_s_expression_checker.py#L98

midannii commented 1 year ago

Thank you !!! :)