Knowledge Graph task02

tags: Knowledge Graph

1. Build a knowledge graph

  • Download a question and answer system based on the knowledge map of the medical field
    git clone https://github.com/zhihao-chen/QASystemOnMedicalGraph.git

  • Modify the username and password of neo4j in build_graph.py

  • Import Data
    python build_graph.py

The prerequisite has been installed the following environment:
python3.0 and above
neo4j 3.5.0 and above
jdk 1.8.0

The imported knowledge graph is as follows:

2. Start the Q&A test

  • Modify related files
    Modify import ahocorasick to pyahocorasick in entity_extractor.py
    Modify the username and password of neo4j in search_answer.py
  • Install related libraries
    conda install pyahocorasick

Report an error
PackagesNotFoundError: The following packages are not available from current channels:
pyahocorasick
Solution
anaconda search -t conda pyahocorasick View available versions
conda install -c https://conda.anaconda.org/conda-forge pyahocorasick install the version you want
See specifically:A link

  • Download and import preprocessed vector files
    https://github.com/Embedding/Chinese-Word-Vectors
    bzip2 -d merge_sgns_bigram_char300.txt.bz2
    Put it in the data folder after decompression

  • Start Q&A test
    python kbqa_test.py

The results of the operation are as follows:

Intelligent Recommendation

Recommendation system Task02: Collaborative filtering (knowledge brain map finishing)

Article Directory Recommended system Task02: Collaborative filtering Recommended system This time I followed the recommendation system organized by Datawhale to team up to study and make preliminary a...

Knowledge Graph: Industry Graph Combat

I. Introduction Regarding the concept of knowledge graph, I will not repeat it here, you can refer toIntroduction to Knowledge Graph The following will be based on the basic data of listed companies, ...

Knowledge graph (3): the basis of knowledge graph

[1] Knowledge Graph and Artificial Intelligence Artificial intelligence business architecture Artificial intelligence technology architecture Intelligent human-machine dialogue business model Artifici...

Knowledge Graph Basics (1)-What is Knowledge Graph

1. Definition of Knowledge Graph The knowledge graph is a relatively new concept in China. There are few papers in China at present. The application is mainly focused on companies with large amounts o...

[Knowledge Graph] (3) OWL of Knowledge Graph Basis

OWL OWL can be seen as an extension of RDFS, which is used to define high-level concepts of RDF describing the interrelationship of resources on the network. It has a more comprehensive vocabulary, pr...

More Recommendation

[Knowledge Graph] Alibaba E-commerce Knowledge Graph

table of Contents 01. Knowledge Engineering and Expert System 02. Semantic Network and Knowledge Graph 1. The Semantic Web 2. Knowledge Graph ① Overview of Knowledge Graph ② Common open knowledge grap...

Knowledge Graph 01: Definition of Knowledge Graph

Public Account: Data Mining and Machine Learning Notes The knowledge graph is a knowledge base that expresses entities (concepts, people, things) in the objective world and their relationships in the ...

Knowledge Graph 02: Application of Knowledge Graph

Public Account: Data Mining and Machine Learning Notes The knowledge graph provides a better ability to organize, manage and understand Internet information, which can be used in languageMeaningful se...

Knowledge Graph 03: Method of Constructing Knowledge Graph

Public Account: Data Mining and Machine Learning Notes 1. Construction method There are three ways to construct a knowledge graph: bottom-up, top-down, and a mixture of the two. 1.1 Bottom-up method B...

Knowledge Graph 04: Storage and Retrieval of Knowledge Graph

Public Account: Data Mining and Machine Learning Notes Web ontology language OWL is currently the main form of storing ontology. OWL is also suitable for the storage of knowledge graphs, but OWL docum...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top