-
Ensure Poetry is installed
-
Install project dependencies:
poetry install -
Download spaCy language model:
poetry run python -m spacy download en_core_web_sm -
Install additional text extraction dependencies:
poetry run pip install textract
Run the download script to get sample documents:
chmod +x download_samples.sh
./download_samples.sh
To test Knowledge Graph Generation on sample documents:
poetry run python test_kg_generation.py
The script will:
- Process each sample document
- Generate Competency Questions
- Extract Relations
- Create Knowledge Graphs
- Save Knowledge Graphs as .ttl files in the samples directory
- Ensure all dependencies are installed
- Check that sample documents are downloaded
- Verify Python and Poetry versions are compatible
-
Missing Dependencies
- Reinstall dependencies
- Check Python version
-
Text Extraction Failures
- Some document formats may have limited extraction capabilities
- Not all documents will generate meaningful knowledge graphs
- DOCX
- XLSX
- Markdown
Modify test_kg_generation.py to:
- Add more sample documents
- Adjust knowledge graph generation parameters
- Implement more detailed testing