Installation
To begin using GLiNKER, you can install it directly from GitHub or from the source.
Install via Pip
pip install git+https://github.com/Knowledgator/GLinker.git
Install from Source
To install the GLiNKER library from source, follow these steps:
-
Clone the Repository:
First, clone the GLiNKER repository from GitHub:
git clone https://github.com/Knowledgator/GLinker.git -
Navigate to the Project Directory:
Change to the directory containing the cloned repository:
cd GLinker -
Install Dependencies:
tipIt's a good practice to create and activate a virtual environment before installing dependencies:
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate -
Install the GLiNKER Package:
Install the GLiNKER package:
pip install -e .With optional dependencies for development and demo:
pip install -e ".[dev,demo]" -
Verify Installation:
You can verify the installation by importing the library in a Python script:
import glinker
print("GLiNKER installed successfully")
Optional Dependencies
GLiNKER supports multiple database backends and NER engines. Install the appropriate packages based on your needs.
spaCy NER Backend
To use spaCy as the NER backend in the L1 layer:
pip install spacy
python -m spacy download en_core_web_sm
For biomedical use cases, install the en_core_sci_sm model from scispaCy:
pip install scispacy
pip install https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.5.4/en_core_sci_sm-0.5.4.tar.gz
Redis Support
pip install redis
Elasticsearch Support
pip install elasticsearch
PostgreSQL Support
pip install psycopg2-binary
The default in-memory dictionary database backend requires no additional dependencies. It is suitable for demos and small-scale use. For production deployments, Redis or Elasticsearch are recommended.
Docker Database Setup
For a quick start with all database backends:
cd scripts/database
docker-compose up -d