Francesco-Sovrano / Legal-Knowledge-Extraction-for-Knowledge-Graph-Based-Question-Answering

Extra documentation (knowledge graph, images, etc..) for the paper "Legal Knowledge Extraction for Knowledge Graph Based Question-Answering".
9 stars 1 forks source link

How to use the extracte KG to answer question? #2

Open ali3assi opened 1 year ago

ali3assi commented 1 year ago

Thanks for sharing this work.

I am trying to execute the code on windows 10.

So once we execute the following:

if __name__ == '__main__':
    ################ Initialise data structures ################
    print('Building Graph..')
    explainable_information_graph = KnowledgeGraphBuilder(KG_BUILDER_DEFAULT_OPTIONS).set_content_list(PHI, remove_stopwords=False, remove_numbers=False, avoid_jumps=True).build()
    # save_graphml(explainable_information_graph, 'knowledge_graph')
    print('Graph size:', len(explainable_information_graph))
    print("Graph's Clauses:", len(list(filter(lambda x: '{obj}' in x[1], explainable_information_graph))))

how can we now ask question like the question in Table 1. in your paper ``` Legal Knowledge Extraction for Knowledge Graph Based Question-Answering


 to get answer?