1.7 KiB
1.7 KiB
OntoCast Demo
This demo shows how OntoCast can extract a knowledge graph from a document and visualize it as a graph.
What You'll See
- Turn a PDF or text document into a knowledge graph (RDF triples)
- Visualize the extracted ontology and facts using free online tools
Demo Steps
1. Start the OntoCast Server
Make sure you have OntoCast installed and a triple store (optional) running. Then start the server:
uv run serve --ontology-directory ../data/ontologies --working-directory ../data
2. Process a Sample Document
You can use the provided sample.pdf or sample.txt in this directory.
For PDF:
curl -X POST http://localhost:8999/process -F "file=@demo/sample.pdf"
For plain text:
curl -X POST http://localhost:8999/process -H "Content-Type: application/json" -d '{"text": "Your document text here"}'
The response will include extracted facts and ontology in Turtle format.
3. Visualize the Output
- Use neo4j built-in graph navigator
- Copy the Turtle output from the
factsorontologyfield in the response.
Example Screenshot:
Files in This Directory
sample.pdf– Example document for demosample.txt– Example plain text for demo- (Optional)
sample.ttl– Example Turtle output
Tips
- You can use your own documents by changing the file path in the
curlcommand. - For more details, see the main README or the Triple Store Setup Guide.
Need Help?
Open an issue or check the OntoCast documentation.
