Giter Site home page Giter Site logo

yuzhimanhua / penner Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 3.0 13.82 MB

PENNER: Pattern-enhanced Nested Named Entity Recognition in Biomedical Literature (BIBM'18)

License: Apache License 2.0

Shell 5.61% Python 34.19% C 32.97% C++ 26.42% Makefile 0.81%
pattern-discovery bioinformatics biomedical-text-mining

penner's Introduction

PENNER: Pattern-enhanced Nested Named Entity Recognition in Biomedical Literature

License

This repository contains the source code for PENNER: Pattern-enhanced Nested Named Entity Recognition in Biomedical Literature.

The general goal of this project is to extract nested entity structures/patterns from a corpus.

Dependency

The following two packages need to be installed before running our code.

  • AutoPhrase: used to extract quality phrases from raw input data.
  • Stanford CoreNLP 3.8.0: used to do POS tagging and select quality Noun Phrases from the previous phrase list generated by AutoPhrase. The quality Noun Phrase will be treated as the "entity".

IMPORTANT NOTE 1: You can directly download the packages from here. Once you unzip the downloaded file, you can see two folders: AutoPhrase/ and CoreNLP/. Please put them under ./src/tools/.

Data Input Format

Two input files are required in ./data/penner/ (You can change "penner" to your dataset name).

(1) The corpus with replaced type tokens and candidate meta-patterns. You can refer to ./data/penner/corpus.txt for detailed format. We show the first 3 lines below:

effect of CHEMICAL on plasma proteins including components of the hemostatic mechanism .
the effect of CHEMICAL ( 1.5 g/day ) on different plasma proteins and on components of the hemostatic system was studied in PATTERN2 with either mild DISEASE or cardiosclerosis .
before treatment , the subjects were investigated weekly on five occasions .

(2) The mapping list of pattern id and pattern surface name. You can refer to ./data/penner/pid2mp.txtfor detailed format. We show the first 3 lines below:

PATTERN1600	the ratio of GENE
PATTERN508	significantly DISEASE
PATTERN3096	severity of DISEASE

To start from a raw corpus, you first need a "flat" biomedical named entity tagger (e.g., scispacy). After entity tagging, please refer to WW-PIE (code in ./pattern.zip) for meta-pattern discovery.

Running

First, you need to set up CoreNLP.

cd ./src/tools/CoreNLP/stanford-corenlp/
./setup.sh

Then, open a new session (e.g., using tmux). Run the following script.

./run.sh

It contains both preprocessing steps and the main expansion algorithm. The expanded nested patterns will be in the output file ./ExpanResult.txt.

IMPORTANT NOTE 2: To modify the input patterns and thresholds, please check Lines 38-46 in ./src/SetExpan/set_expan_main.py.

Citation

Our implementation is adapted from SetExpan. If you find this repository useful, please cite the following paper:

@inproceedings{wang2018penner,
  title={PENNER: Pattern-enhanced Nested Named Entity Recognition in Biomedical Literature},
  author={Wang, Xuan and Zhang, Yu and Li, Qi and Wu, Cathy H. and Han, Jiawei},
  booktitle={BIBM'18},
  pages={540--547},
  year={2018}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.