OntoNote is a tool for semantically annotating natural language documents against formal ontologies. Where the ONTO-TRON-5000 builds ontologies from structured CSV data, OntoNote works from the other direction — upload a PDF or Word document, highlight any word or phrase, and tag it to a class from BFO, CCO, or any ontology you provide. Your annotations generate RDF automatically in formats ready for triplestore ingestion, LLM training corpus preparation, and ontology construction from domain literature.
The output is TriG format: one named graph per paragraph, every tagged span encoded as an Information Bearing Entity with its text value and character offsets, typed to the user's chosen class via a BFO-compliant ICE individual. Paragraphs can be linked to each other semantically, and the entire document structure maps to BFO/CCO conventions without manual triple authoring.
- Upload PDF or DOCX documents — multiple documents open simultaneously as tabs
- Highlight any word or phrase to open the Tag Modal
- Search existing ontology terms or create a new custom class on the spot
- Tagged spans appear as color-coded highlights, each color tied to a specific class and consistent across all paragraphs and documents
- Phrase-aware overlap detection — tagging a phrase does not block individual words within it from being tagged in other phrases
- Click any existing highlight to edit its class assignment or delete it
- Every paragraph gets a clickable
§Nbadge — click to open the Paragraph Link Manager - Paragraph links encode semantic connections between sections as triples in the TriG default graph
- Linked paragraphs show a filled badge with
*indicator
- Dual-mode canvas: Build (freehand — add classes, draw property edges, resize nodes, zoom) and From Annotations (canvas auto-generated from tagging work, sync on demand)
- Promote an annotated canvas to Build mode for manual refinement
- Full ontology browser panel: class hierarchy, object properties, and data properties in a Protege-style tree with definitions, IRIs, superclasses, domain, and range
- Starts empty — populates when you load an ontology framework
- Add any class from the browser directly to the canvas
- BFO only, CCO only, BFO+CCO, or no framework — nothing loaded by default
- Upload any
.ttl,.owl, or.rdffile and designate it as top-level, mid-level, or domain ontology - Switching frameworks refreshes the browser, search results, and property dropdowns
- Works identically for BFO/CCO and user-uploaded ontologies (FIBO, IDO, software ontologies, etc.)
- TriG — one named graph per paragraph, IBE + ICE individuals,
cco:has_text_valueon every span automatically, paragraph links in the default graph. Drops directly into GraphDB, Oxigraph, or any triplestore - NIF — W3C Natural Language Interchange Format with RFC5147 character offsets and
itsrdf:taClassRefper span - TTL — ontology TBox only, no annotations
- Mermaid — diagram syntax for the canvas ontology, paste into mermaid.live
- SPARQL query pack — downloads a
.sparqlfile with 4-5 queries tailored to the actual classes and properties used in the session, ready to run against any triplestore
- Ontology validation report — flags disjoint class conflicts within paragraphs, TBox assertions referencing unknown classes, and custom classes with no parent linkage
- Cross-document consistency check — compares tagging across all open document tabs and flags any term tagged as different classes across documents, with an option to export
owl:differentFromassertions encoding intentional distinctions
- One-click NLP pre-annotation via spaCy — runs named entity recognition over the loaded document and generates ghost suggestion pills beneath each paragraph
- Maps spaCy entity types to the closest BFO/CCO class (PERSON → Agent, ORG → Organization, LAW → Directive ICE, DATE → Temporal Region, etc.)
- Confirm to promote a suggestion to a full annotation, dismiss to remove it — every decision stays human-in-the-loop
- Requires
en_core_web_sm(installed automatically in Docker)
- Save the full annotation session to disk at any point — paragraphs, annotations, paragraph links, canvas state, and active framework all serialized to JSON
- Resume saved sessions from the Sessions modal or load a session file directly
- Docker Desktop for Mac, Windows, or Linux
- Python 3.11 or higher
- Node.js 18 or higher
- npm
Clone the repository
git clone https://github.com/Jlbillig/OntoNote.git
cd OntoNoteStart the application
docker-compose upOpen in browser
http://localhost:5056
To rebuild after changes: docker-compose up --build
Clone the repository
git clone https://github.com/Jlbillig/OntoNote.git
cd OntoNoteInstall Python dependencies
pip install flask flask-cors rdflib owlready2 pdfminer.six python-docxOptional — NLP pre-annotation
pip install spacy
python3 -m spacy download en_core_web_smInstall Node dependencies and build frontend
npm install
npm run buildRun the application
python3 app.pyOpen in browser
http://127.0.0.1:5056
Docker Issues
- Try
docker-compose downthendocker-compose up --build - Check port 5056 is not already in use
Manual Installation Issues
- Ensure Python 3.11+ and Node.js 18+ are installed
- If the build fails try
rm -rf node_modules && npm install - Make sure
bfo-core.ttlandCommonCoreOntologiesMerged.ttlare present in the root directory
Ontology Browser Shows Nothing
- This is expected on first load — no framework is active by default
- Click "Ontology Framework" in the toolbar and select BFO, CCO, or upload your own ontology file
Pre-Annotation Button Returns Error
- spaCy is not installed or the model is missing
- Run
pip install spacy && python3 -m spacy download en_core_web_sm - In Docker this is handled automatically at build time
Port already in use
- Change the port in
app.pyanddocker-compose.ymlfrom5056to any available port
Any further problems please create an issue.
MIT