Git Product home page Git Product logo

ibent's Introduction

IBEnt

Framework for identifying biomedical entities

Dependencies:

Configuration

A Dockerfile is provided to help with the installation. Build and then run with the -i flag. After setting up the dependencies, you have to run python src/config/config.py to set up some values. You can use the CHEMDNER-patents sample data to check if the system is working correctly. Then run ./benchmarks/check_setup.sh to confirm if everything is set up correctly.

Usage

To run distant supervision multi-instance learning experiments, use src/trainevaluate.py and check mil.sh for an example.

You can either run the system in batch or server mode. Batch mode expects specific data formats and can be used to train classifiers and evaluate on a test set. For example, to train a classifier models/class1.ser.gz from the data on corpus1:

python src/main.py load_corpus --goldstd corpus1
python src/main.py train --goldstd corpus1 --models models/class1

To test with this classifier on corpus2 and save the results to data/results1.pickle:

python src/main.py load_corpus --goldstd corpus2
python src/main.py test --goldstd corpus2 -o pickle data/results1 --models models/class1

To evaluate the results on the corpus2 gold standard:

python src/evaluate.py evaluate corpus2 --results data/results1 --models models/class1

To map the term to the ChEBI ontology:

python src/evaluate.py chebi corpus2 --results data/results1 --models models/class1

If you just want to send text to previously trained classifiers and get results, use the server mode. Start the server with python src/server.py and input text with python src/client. You can also use your own client, sending a POST request to the address in config.host_ip.

ibent's People

Contributors

andrelamurias avatar dpavot avatar

Stargazers

Yiting Ju avatar

Watchers

James Cloos avatar  avatar Manuel Lobo avatar  avatar

ibent's Issues

Problem when running check_setup.sh

Although I've configured "use_chebi?" as False, I still get this error when trying to run check_setup.py.

Traceback (most recent call last):
  File "src/main.py", line 13, in <module>
    from classification.ner.banner import BANNERModel
  File "/src/classification/ner/banner.py", line 17, in <module>
    from classification.ner.simpletagger import SimpleTaggerModel, create_entity
  File "/src/classification/ner/simpletagger.py", line 5, in <module>
    from text.chemical_entity import element_base, ChemicalEntity
  File "/src/text/chemical_entity.py", line 4, in <module>
    from postprocessing.chebi_resolution import find_chebi_term3
  File "/src/postprocessing/chebi_resolution.py", line 15, in <module>
    from config.config import chebi_conn as db
ImportError: cannot import name chebi_conn

It tries to get the connection to the Chebi MySQL DB although I've indicated that I don't want to use it.

simpletagger.py Protein Entity

Error when importing ProteinEntity from text.protein_entity.

Tries to import go_conn (in config.py) that is only created if use_go is true (in settings.json). Fails import if use_go is false.

reader.transmir_corpus.py

File name is capitalized "Transmir_corpus.py".

Traceback (most recent call last):
File "src/main.py", line 38, in
from reader.transmir_corpus import TransmirCorpus
ImportError: No module named transmir_corpus

base.prop not found

A base.prop file should be added to bin/ and then copied to the Stanford NER path

sentence.py : tag_entity() -> TypeError

When the argument Exclude is passed as None, it fails in line 196:
print self.text[tlist[0].start:exclude[0][0]] #Fails if exclude is None
print self.text[exclude[0][0]:exclude[0][1]]
print self.text[exclude[0][1]:tlist[-1].end]

Traceback (most recent call last):
...
...
File "/home/h/Desktop/IBEnt2/src/text/sentence.py", line 196, in tag_entity
print self.text[tlist[0].start:exclude[0][0]]
TypeError: 'NoneType' object has no attribute 'getitem'

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.