Skip to content
/ paper2kg Public
forked from xyjigsaw/paper2kg

Generate Knowledge Graph for Paper

License

Notifications You must be signed in to change notification settings

pgkk/paper2kg

 
 

Repository files navigation

paper2kg

Generate Knowledge Graph for Paper

Extractor/Algorithm

  • Ollie, Java code extracts relation triples which has been integrated into the project.

Notice: BERT-BiLSTM-CRF will be added.

Files

  • paperAPI.py: api entry
  • d3.html: visualization demo (You need to replace the 'links' value [line 8, d3.html].)
  • toolkit
    • Ollie: triple extractor
    • pdf_parser: pdf2xml

Requirements (python packages)

  • uvicorn
  • fastapi
  • pydantic
  • nltk

Before using NLTK, you may need to add the following code to the top of readxml.py and text2kg.py

nltk.download('punkt')
nltk.download('averaged_perceptron_tagger')

Once the download is successful, these two lines of code must be removed.

PS: JAVA environment is required.

Run

No API: Configure readXML.py and run.

or

uvicorn paperAPI:app --reload --port 8000 --host 127.0.0.1

or

python paperAPI.py

Preview

Word Classes/tags for paper2api

  • NNP: proper noun, singular
  • NNPS: proper noun, plural
  • NN: noun, singular
  • NNS: noun, plural

About

Generate Knowledge Graph for Paper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 78.7%
  • HTML 21.3%