Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## 2026-01-26

- [x] updated the package dependencies to resolve install errors coming from older packages
- [x] updated the ontology references in `ontologies.csv`
35 changes: 15 additions & 20 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
[project]
name = "text2term"
version = "4.5.0"
version = "4.6.0"
description = "A tool for mapping free-text descriptions of entities to ontology terms"
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
keywords = ["ontology", "metadata", "text mining", "metadata curation", "ontology mapping"]

authors = [
{ name="Rafael Goncalves", email="goncalves@stanford.edu" },
{ name="Rafael Goncalves", email="rsgoncalves@gmx.com" },
{ name="Jason Payne", email="paynejason@gmail.com" }
]
maintainers = [
{ name="Rafael Goncalves", email="goncalves@stanford.edu" }
{ name="Rafael Goncalves", email="rsgoncalves@gmx.com" }
]

classifiers = [
Expand All @@ -25,25 +25,20 @@ classifiers = [
]

dependencies = [
"owlready2~=0.47",
"argparse~=1.4.0",
"pandas~=2.2.3",
"numpy~=1.26.4",
"gensim~=4.3.2",
"scipy~=1.12.0",
"scikit-learn~=1.6.1",
"setuptools~=80.8.0",
"requests~=2.32.3",
"tqdm~=4.67.1",
"sparse-dot-topn~=1.1.3",
"bioregistry~=0.11.10",
"nltk~=3.9.1",
"rapidfuzz~=3.12.2",
"shortuuid~=1.0.11",
"bioregistry>=0.11.10",
"nltk>=3.9.1",
"owlready2>=0.47",
"pandas>=2.2.3",
"rapidfuzz>=3.12.2",
"requests>=2.32.3",
"scikit-learn>=1.6.1",
"shortuuid>=1.0.11",
"sparse-dot-topn>=1.1.3",
"tqdm>=4.67.1",
]

[project.optional-dependencies]
dev = ["pytest==8.1.1"]
dev = ["pytest>=8.1.1"]

[tool.setuptools]
packages = ["text2term"]
Expand All @@ -53,7 +48,7 @@ include-package-data = true
omit = ["*/__main__.py"]

[build-system]
requires = ["setuptools>=80.8", "wheel"]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project.urls]
Expand Down
4 changes: 2 additions & 2 deletions test/test_input.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
asthma
acute bronchitis
cheese pizza
fish pizza
8 changes: 4 additions & 4 deletions test/test_input_with_tags.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
asthma;:;disease
acute bronchitis;:;important,tags
hypertension NOS;:;disease
colon disease
cheese pizza;:;pizza
fish pizza;:;seafood,topping
pizza NOS;:;unspecified
mystery topping
102 changes: 37 additions & 65 deletions test/test_ontology.owl
Original file line number Diff line number Diff line change
@@ -1,101 +1,73 @@
<?xml version="1.0"?>
<rdf:RDF xmlns="http://www.semanticweb.org/rafaelsg/ontologies/2025/5/untitled-ontology-18/"
xml:base="http://www.semanticweb.org/rafaelsg/ontologies/2025/5/untitled-ontology-18/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
<rdf:RDF xmlns="https://text2term.ontology/test/"
xml:base="https://text2term.ontology/test/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:terms="http://purl.org/dc/terms/"
xmlns:oboInOwl="http://www.geneontology.org/formats/oboInOwl#"
xmlns:Thesaurus="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#">
<owl:Ontology rdf:about="https://text2term.ontology/test">
<owl:imports rdf:resource="https://raw.githubusercontent.com/owlcs/pizza-ontology/refs/heads/master/pizza.owl"/>
</owl:Ontology>



<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Annotation properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->




<!-- http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#P90 -->
<owl:Ontology rdf:about="https://text2term.ontology/test/"/>

<owl:AnnotationProperty rdf:about="http://ncicb.nci.nih.gov/xml/owl/EVS/Thesaurus.owl#P90"/>



<!-- http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasBroadSynonym"/>



<!-- http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym"/>



<!-- http://www.w3.org/2004/02/skos/core#definition -->

<owl:AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasExactSynonym"/>
<owl:AnnotationProperty rdf:about="http://www.w3.org/2004/02/skos/core#definition"/>


<owl:ObjectProperty rdf:about="https://text2term.ontology/test/hasTopping">
<rdfs:label>contains topping</rdfs:label>
</owl:ObjectProperty>

<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Classes
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<owl:ObjectProperty rdf:about="https://text2term.ontology/test/hasLocation">
<rdfs:label>location</rdfs:label>
</owl:ObjectProperty>


<owl:Class rdf:about="https://text2term.ontology/test/Pizza">
<rdfs:label>Pizza</rdfs:label>
<skos:definition>A dish made with dough and toppings</skos:definition>
</owl:Class>

<owl:Class rdf:about="https://text2term.ontology/test/IceCream">
<rdfs:label>Ice Cream</rdfs:label>
<owl:disjointWith rdf:resource="https://text2term.ontology/test/Pizza"/>
</owl:Class>

<!-- https://text2term.ontology/test/FishyPizza -->
<owl:Class rdf:about="https://text2term.ontology/test/CheesePizza">
<rdfs:subClassOf rdf:resource="https://text2term.ontology/test/Pizza"/>
<rdfs:label>Cheese Pizza</rdfs:label>
<oboInOwl:hasExactSynonym>Plain Pizza</oboInOwl:hasExactSynonym>
</owl:Class>

<owl:Class rdf:about="https://text2term.ontology/test/FishyPizza">
<owl:equivalentClass>
<owl:Class>
<owl:intersectionOf rdf:parseType="Collection">
<rdf:Description rdf:about="https://raw.githubusercontent.com/owlcs/pizza-ontology/refs/heads/master/pizza.owl#Pizza"/>
<owl:Restriction>
<owl:onProperty rdf:resource="https://raw.githubusercontent.com/owlcs/pizza-ontology/refs/heads/master/pizza.owl#hasTopping"/>
<owl:someValuesFrom rdf:resource="https://raw.githubusercontent.com/owlcs/pizza-ontology/refs/heads/master/pizza.owl#FishTopping"/>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
</owl:equivalentClass>
<rdfs:subClassOf rdf:resource="https://text2term.ontology/test/Pizza"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="https://text2term.ontology/test/hasTopping"/>
<owl:someValuesFrom rdf:resource="https://text2term.ontology/test/FishTopping"/>
</owl:Restriction>
</rdfs:subClassOf>
<Thesaurus:P90>pizza with fish</Thesaurus:P90>
<oboInOwl:hasBroadSynonym>Seafood Pizza</oboInOwl:hasBroadSynonym>
<oboInOwl:hasRelatedSynonym>Fish Pizza</oboInOwl:hasRelatedSynonym>
<rdfs:label>Pizza that contains fish</rdfs:label>
<skos:definition>A pizza that contains a fish ingredient</skos:definition>
</owl:Class>


<owl:Class rdf:about="https://text2term.ontology/test/FishTopping">
<rdfs:label>Fish Topping</rdfs:label>
</owl:Class>

<!-- https://text2term.ontology/test/VanillaIceCream -->
<owl:Class rdf:about="https://text2term.ontology/test/TomatoTopping">
<rdfs:label>Tomato Topping</rdfs:label>
</owl:Class>

<owl:Class rdf:about="https://text2term.ontology/test/VanillaIceCream">
<rdfs:subClassOf rdf:resource="https://raw.githubusercontent.com/owlcs/pizza-ontology/refs/heads/master/pizza.owl#IceCream"/>
<rdfs:subClassOf rdf:resource="https://text2term.ontology/test/IceCream"/>
<rdfs:label>Vanilla Ice Cream</rdfs:label>
<owl:deprecated rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean">true</owl:deprecated>
</owl:Class>
</rdf:RDF>



<!-- Generated by the OWL API (version 4.5.29.2024-05-13T12:11:03Z) https://github.com/owlcs/owlapi -->

Loading
Loading