Unified data models and interfaces for syntactic and semantic frame ontologies
Project description
Glazing
Unified data models and interfaces for syntactic and semantic frame ontologies.
Features
- 🚀 One-command setup:
glazing initdownloads and prepares all datasets - 📦 Type-safe models: Pydantic v2 validation for all data structures
- 🔍 Unified search: Query across all datasets with consistent API
- 🔗 Cross-references: Automatic mapping between resources
- 💾 Efficient storage: JSON Lines format with streaming support
- 🐍 Modern Python: Full type hints, Python 3.13+ support
Installation
pip install glazing
Quick Start
Initialize all datasets (one-time setup, ~54MB download):
glazing init
Then start using the data:
from glazing.search import UnifiedSearch
# Automatically uses default data directory after 'glazing init'
search = UnifiedSearch()
results = search.search("give")
for result in results[:5]:
print(f"{result.dataset}: {result.name} - {result.description}")
CLI Usage
Search across datasets:
# Search all datasets
glazing search query "abandon"
# Search specific dataset
glazing search query "run" --dataset verbnet
# Find cross-references
glazing search cross-ref --source propbank --id "give.01" --target verbnet
Python API
Load and work with individual datasets:
from glazing.framenet.loader import FrameNetLoader
from glazing.verbnet.loader import VerbNetLoader
# Loaders automatically use default paths and load data after 'glazing init'
fn_loader = FrameNetLoader() # Data is already loaded
frames = fn_loader.frames
vn_loader = VerbNetLoader() # Data is already loaded
verb_classes = list(vn_loader.classes.values())
Cross-reference resolution:
from glazing.references.extractor import ReferenceExtractor
from glazing.verbnet.loader import VerbNetLoader
from glazing.propbank.loader import PropBankLoader
# Load datasets
vn_loader = VerbNetLoader()
pb_loader = PropBankLoader()
# Extract references
extractor = ReferenceExtractor()
extractor.extract_verbnet_references(list(vn_loader.classes.values()))
extractor.extract_propbank_references(list(pb_loader.framesets.values()))
# Access PropBank cross-references
if "give.01" in extractor.propbank_refs:
refs = extractor.propbank_refs["give.01"]
vn_classes = refs.get_verbnet_classes()
print(f"VerbNet classes for give.01: {vn_classes}")
Supported Datasets
- FrameNet 1.7: Semantic frames and frame elements
- PropBank 3.4: Predicate-argument structures
- VerbNet 3.4: Verb classes with thematic roles
- WordNet 3.1: Synsets and lexical relations
Documentation
Full documentation available at https://glazing.readthedocs.io.
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
# Development setup
git clone https://github.com/aaronstevenwhite/glazing
cd glazing
pip install -e ".[dev]"
Citation
If you use Glazing in your research, please cite:
@software{glazing2025,
author = {White, Aaron Steven},
title = {Glazing: Unified Data Models and Interfaces for Syntactic and Semantic Frame Ontologies},
year = {2025},
url = {https://github.com/aaronstevenwhite/glazing},
doi = {10.5281/zenodo.17185626}
}
License
This package is licensed under an MIT License. See LICENSE file for details.
Links
Acknowledgments
This project was funded by a National Science Foundation (BCS-2040831) and builds upon the foundational work of the FrameNet, PropBank, VerbNet, and WordNet teams.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glazing-0.1.0.tar.gz.
File metadata
- Download URL: glazing-0.1.0.tar.gz
- Upload date:
- Size: 172.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86a7f932f3fd2479779b64138a950f5728b71c6b16d177ab98a98d2687af9fb1
|
|
| MD5 |
5a5e3a53e260be8bfcae228c8a6fe8ac
|
|
| BLAKE2b-256 |
16249bf6a83ba5c20e0c5203de497a13063533c931a533e0b944331f085e7148
|
File details
Details for the file glazing-0.1.0-py3-none-any.whl.
File metadata
- Download URL: glazing-0.1.0-py3-none-any.whl
- Upload date:
- Size: 181.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd7f210d1ec53c552a69e3df56ea6d08abcfe3d272f0adf8b2e3d8f6e2b7b846
|
|
| MD5 |
fe6fa61803b0ab73676fcfdc1c6861dc
|
|
| BLAKE2b-256 |
8fc6e27a6dc3fa030e9b9c21b3ac5059662fdb54ac38edf65c87fdfcaa42dceb
|