The main objective of this tool is to apply custom rules for entity recognition to supplement the ontology dictionary generated from kgx for ontoRunNER.
python setup.py install
Get termlist files for ontologies:
ontology_nodes.tsv
file derived from kgx as shown hereontoRunNER
use prepare-termlist
to get ontology_termlist.tsv
Have a rules.yaml
and schema.yaml
files prepared that resemble synonym_rules.yaml
and schema.yaml
in this project.
from synonymizer import synonymize
synonymize.run(
rule_file = [path to rules.yaml],
schema_file = [path to schema.yaml],
data_folder = [location of the folder that cotains the termlist.tsv files]
)
python -m synonymizer.cli run
-r [path to rules.yaml]
-s [path to schema.yaml]
-d [location of the folder that cotains the termlist.tsv files]
or
python -m synonymizer.cli run
--rule [path to rules.yaml]
--schema [path to schema.yaml]
--data [location of the folder that cotains the termlist.tsv files]