Skip to content

Commit 56c8838

Browse files
authored
Merge pull request #254 from sciknoworg/dev
2 parents 190c2cb + b7e0678 commit 56c8838

File tree

21 files changed

+1251
-219
lines changed

21 files changed

+1251
-219
lines changed

.github/workflows/test-package.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Test OntoLearner Package
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
python-version: [3.10.x, 3.11.x, 3.12.x, 3.13.x]
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install Poetry
27+
run: |
28+
curl -sSL https://install.python-poetry.org | python3 -
29+
echo "$HOME/.local/bin" >> $GITHUB_PATH
30+
31+
- name: Configure Poetry and install dependencies
32+
run: |
33+
poetry config virtualenvs.create false
34+
poetry install --no-interaction --with dev
35+
36+
- name: Run tests
37+
run: |
38+
poetry run pytest

MAINTANANCE.md

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,60 @@ The primary goals of the OntoLearner maintenance objectives are to:
1414

1515
A core team will be responsible for the ongoing maintenance of OntoLearner, including:
1616
- **Lead Maintainers**: Oversee all maintenance activities, ensure the direction aligns with the project's vision, and handle critical issues.
17-
- [Hamed Babaei Giglou](https://hamedbabaei.github.io/) – Project Lead – Responsible for the overall vision, maintenance activities, and coordination of the library’s development.
17+
- [Dr. Jennifer D'Souza](https://sites.google.com/view/jen-web) and [Hamed Babaei Giglou](https://hamedbabaei.github.io/) – Project Lead – Responsible for the overall vision, maintenance activities, and coordination of the library’s development.
1818
- [Andrei Aionei](https://www.linkedin.com/in/andreiaioanei/) – Project Senior Software Engineer – Responsible for maintenance activities and the library’s development.
19-
- [Dr. Jennifer D'Souza](https://sites.google.com/view/jen-web) and [Prof. Dr. Sören Auer](https://www.tib.eu/en/research-development/research-groups-and-labs/data-science-and-digital-libraries/staff/soeren-auer) – Project Supervisors and Principal Investigators (PI) – Responsible for guiding ideation, refining ideas, and defining the project's high-level direction to align the library's goals with broader academic and research objectives.
19+
- [Prof. Dr. Sören Auer](https://www.tib.eu/en/research-development/research-groups-and-labs/data-science-and-digital-libraries/staff/soeren-auer) – Project Supervisors and Principal Investigators (PI) – Responsible for guiding ideation, refining ideas, and defining the project's high-level direction to align the library's goals with broader academic and research objectives.
2020

2121
## 2. Current Ongoing Maintenance and Plans
2222

2323
A roadmap for new features and improvements, ensuring the library evolves in response to user needs and feedback is presented as follows. This list will be updated regularly as we explore the variety of works within the ontology alignment field to ensure the diverse methods within the library.
2424

25-
| Category | Description | Status |
26-
|:-----------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------:|
27-
| Reasoning | Integration of reasoning-oriented prompt evaluation tasks to test LLM capabilities in generating consistent and logically valid ontological structures (e.g., subclass chains, disjointness, transitivity). | TODO |
28-
| Agentic | Support for agent-based extensions using platforms like [CrewAI](https://github.com/crewAIInc/crewAI) to enable autonomous, multi-step ontology engineering workflows coordinated through modular agents. | TODO |
29-
| ... | ... | .. |
25+
| Category | Description | Status |
26+
|:-----------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------:|
27+
|Ontologizer| Adding more ontologies to the OntoLearner | InProgress|
28+
| Reasoning | Integration of reasoning-oriented prompt evaluation tasks to test LLM capabilities in generating consistent and logically valid ontological structures (e.g., subclass chains, disjointness, transitivity). | TODO |
29+
| Agentic | Support for agent-based extensions using platforms like [CrewAI](https://github.com/crewAIInc/crewAI) to enable autonomous, multi-step ontology engineering workflows coordinated through modular agents. | TODO |
30+
|Documentation| Adding more documentation and tutorials | InProgress|
31+
|Testing| Adding unittest to support different stages of modularization | InProgress|
32+
|Learner| Incorporating more learner models. Including those from LLMs4OL challenge | InProgress|
33+
|Reasoning| Adding reasoning techniques | To-Do|
34+
|...| ... |...|
35+
36+
> **If you are willing to have your Ontology Learning model or feature within OntoLearner don't hesitate to contact us via [GitHub Issues](https://github.com/sciknoworg/ontolearner/issues) or via email to [[email protected]](mailto:[email protected])**.
37+
38+
## 3. Maintenance Regulations
39+
The following activities will be performed regularly:
40+
- **Code Quality**:
41+
- Enforce PEP 8 compliance and code consistency using `pre-commit` hooks with `ruff` for linting and formatting.
42+
- Run pre-commit checks regularly to maintain code quality and prevent style violations before commits.
43+
- Perform continuous code refactoring to improve readability and reduce technical debt.
44+
- **Version Control**:
45+
- During the development or contribution we obligated to use Git with clear commit messages following best practices.
46+
- We follow semantic versioning for the releases (e.g., v1.0.0 for the first stable release).
47+
- OntoLearner Utilize GitHub **CI/CD** for automated ReadTheDocs deployment on every push to the main branch.
48+
- Moreover, the PyPI release is automated for each versioning tag ensuring easy distribution.
49+
- Each release includes (and should contain) proper documentation and a detailed in the **[CHANGELOG.md](CHANGELOG.md)** for new features, bug fixes, and breaking changes.
50+
- **Release Cycle**:
51+
- **Major Releases**: Major feature updates or breaking changes will be released every 6 months. These releases will introduce new features, remove deprecated functionality, or make significant changes to the architecture.
52+
- **Minor Releases**: Regular updates that add new features or improvements will be released every month.
53+
- **Patch Releases**: Bug fixes, security patches, and minor adjustments will be released as necessary, with a goal of addressing critical issues within 2-3 weeks of identification.
54+
- **Documentation**
55+
- Each new ontology should include a documentation guide for users to quickly use that model within the OntoLearner on real-world datasets.
56+
- User documentation aim is to provide detailed information for each class and method for users to easily understand and apply.
57+
- Code-level documentation is a "must" for the project as we use `Sphinx` to generate API documentation from docstrings.
58+
- **Compatibility Checks**:
59+
- Regularly monitoring and updating dependencies (e.g., `rdflib`, `owlready2`, `transformers`) to ensure compatibility with the latest Python versions and security patches.
60+
- Regularly test compatibility with Python 3.10 and newer versions (e.g., Python 3.11, 3.12).
61+
- **Security Management**:
62+
- The sensitive data such as API keys or passwords are not allowed to be hard-coded in the repository. But allowed to use feed as an argument while using specific models.
63+
- Each merge request will be assigned for code reviews focusing on security, especially when handling user data or integrating with external services.
64+
65+
66+
## 4. Community Engagement
67+
- We use [GitHub Issues](https://github.com/sciknoworg/ontolearner/issues) to track bugs, feature requests, and enhancements, ensuring critical issues get a response within **48 hours**.
68+
- Contribution guidelines are outlined in **[CONTRIBUTING.md](CONTRIBUTING.md)**, detailing what contributions can be made, code standards, and PR submission processes.
69+
70+
- OntoLearner Code of Conduct is available at **[CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)** to foster a welcoming and inclusive environment for community engagement.
71+
72+
73+
For any inquiries for issue reporting, or long-term support, please feel free to contact the maintainer at **[[email protected]](mailto:[email protected])**.

docs/source/benchmarking/benchmark.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ Ontologies modeling the structure, process, and administration of scholarly rese
303303
scholarly_knowledge/duo.rst
304304
scholarly_knowledge/eurio.rst
305305
scholarly_knowledge/expo.rst
306+
scholarly_knowledge/framester.rst
306307
scholarly_knowledge/frapo.rst
307308
scholarly_knowledge/frbroo.rst
308309
scholarly_knowledge/lexinfo.rst
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
Framester Ontology (Framester)
2+
========================================================================================================================
3+
4+
Overview
5+
--------
6+
Framester is a a frame-based ontological resource acting as a hub
7+
between linguistic resources such as FrameNet, WordNet, VerbNet, BabelNet,
8+
DBpedia, Yago, DOLCE-Zero, and leveraging this wealth of links to create
9+
an interoperable predicate space formalized according to frame semantics and semiotics.
10+
Framester uses WordNet and FrameNet at its core, expands it to other resources
11+
transitively, and represents them in a formal version of frame semantics.
12+
13+
:Domain: Scholarly Knowledge
14+
:Category: Linguistics
15+
:Current Version: 1.0
16+
:Last Updated: 19-04-2016
17+
:Creator: Aldo Gangemi
18+
:License: Creative Commons 4.0
19+
:Format: RDF
20+
:Download: `Framester Ontology (Framester) Homepage <http://150.146.207.114/lode/extract?url=http://ontologydesignpatterns.org/ont/framester/framester.owl>`_
21+
22+
Graph Metrics
23+
-------------
24+
- **Total Nodes**: 174
25+
- **Total Edges**: 398
26+
- **Root Nodes**: 85
27+
- **Leaf Nodes**: 38
28+
29+
Knowledge coverage
30+
------------------
31+
- Classes: 59
32+
- Individuals: 0
33+
- Properties: 77
34+
35+
Hierarchical metrics
36+
--------------------
37+
- **Maximum Depth**: 3
38+
- **Minimum Depth**: 0
39+
- **Average Depth**: 0.69
40+
- **Depth Variance**: 0.65
41+
42+
Breadth metrics
43+
------------------
44+
- **Maximum Breadth**: 85
45+
- **Minimum Breadth**: 4
46+
- **Average Breadth**: 42.25
47+
- **Breadth Variance**: 937.69
48+
49+
Dataset Statistics
50+
------------------
51+
Generated Benchmarks:
52+
- **Term Types**: 0
53+
- **Taxonomic Relations**: 135
54+
- **Non-taxonomic Relations**: 1
55+
- **Average Terms per Type**: 0.00
56+
57+
Usage Example
58+
-------------
59+
.. code-block:: python
60+
61+
from ontolearner.ontology import Framester
62+
63+
# Initialize and load ontology from local file
64+
ontology = Framester()
65+
ontology.load("path/to/ontology.RDF")
66+
67+
# Or load from a Hugging Face repository
68+
ontology = Framester()
69+
ontology.load()
70+
71+
# Extract datasets
72+
data = ontology.extract()
73+
74+
# Access specific relations
75+
term_types = data.term_typings
76+
taxonomic_relations = data.type_taxonomies
77+
non_taxonomic_relations = data.type_non_taxonomic_relations

ontolearner/__init__.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@
2222
from .utils.train_test_split import train_test_split
2323
from .ontology import * # noqa
2424

25+
__all__ = [
26+
"AutoLearnerLLM",
27+
"BERTRetrieverLearner",
28+
"LearnerPipeline",
29+
"Processor",
30+
"data_structure",
31+
"text2onto",
32+
"ontology",
33+
"utils",
34+
"tools",
35+
"learner",
36+
"base",
37+
"train_test_split"
38+
]
39+
2540
logging.basicConfig(
2641
level=logging.INFO,
2742
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'

0 commit comments

Comments
 (0)