Giter VIP home page Giter VIP logo

adorner's Introduction

DOI fair-software.eu

adorNER

This is a multi-ontology concept recognition model. It takes OBO ontologies as inputs, and trains a text classifier for identifying specific ontology terms in text.


Requirements

  • python==3.9.12

  • tensorflow==2.9.1

  • tensorflow-addons==0.18.0

  • regex

  • numpy

  • A copy of the pre-trained elmo model


Training example

Example training parameter json:

{
    "model_type": "sae",
    "obo_params" : "path/to/obo/parameter/file.json",
    "hub_dir": "directory/containing/elmo/model",
    "output": "directory/for/trained/model",
    "num_filters": 1024,
    "concept_dim": 1024,
    "compression_ratio": 8,
    "epochs": 10000,
    "mean": true
}

Example OBO parameter json:

{
    "ontologies": [
        {   "name": "Human Phenotype Ontology",
            "obo_path": "ontologies/hpo.obo",
            "root_id": "HP:0000001",
            "main": 1
        },
        {   "name": "Mammalian Phenotype Ontology",
            "obo_path": "ontologies/mp.obo",
            "root_id": "MP:0000001",
            "main": 0
        }
    ]
}

To train model:

python adorNER/train.py --params path/to/training/parameter/file.json

Use trained model

Example annotation parameter json:

{
    "hub_dir": "elmo",
    "model_dir": "directory/of/trained/model",
    "input_dir": "directory/containing/txt/files",
    "output_dir": "directory/to/output/identified/ontology/terms",
    "threshold": 0.55,
    "max_rows": -1
}

To use model:

python adorNER/annotate_text.py --params path/to/annotation/parameter/file.json

adorner's People

Contributors

lorcanpd avatar

Stargazers

Julio C. Rangel avatar Charles Tapley Hoyt avatar Janna Hastings avatar

Watchers

 avatar

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.