glazing 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
glazing-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Aaron Steven White
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
glazing-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: glazing
3
+ Version: 0.0.1
4
+ Summary: A unified interface for FrameNet, PropBank, VerbNet, and WordNet
5
+ Author-email: Aaron Steven White <aaron.white@rochester.edu>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/aaronstevenwhite/glazing
8
+ Project-URL: Bug Reports, https://github.com/aaronstevenwhite/glazing/issues
9
+ Project-URL: Source, https://github.com/aaronstevenwhite/glazing
10
+ Project-URL: Documentation, https://glazing.readthedocs.io
11
+ Keywords: nlp,linguistics,framenet,propbank,verbnet,wordnet,semantics,lexicon
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Classifier: Topic :: Text Processing :: Linguistic
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.13
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: pydantic>=2.5.0
24
+ Requires-Dist: typing-extensions>=4.9.0
25
+ Requires-Dist: python-dateutil>=2.8.2
26
+ Provides-Extra: dev
27
+ Requires-Dist: ruff>=0.1.9; extra == "dev"
28
+ Requires-Dist: mypy>=1.8.0; extra == "dev"
29
+ Requires-Dist: pytest>=7.4.3; extra == "dev"
30
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
31
+ Requires-Dist: pytest-asyncio>=0.21.1; extra == "dev"
32
+ Requires-Dist: pre-commit>=3.6.0; extra == "dev"
33
+ Provides-Extra: docs
34
+ Requires-Dist: mkdocs>=1.5.3; extra == "docs"
35
+ Requires-Dist: mkdocs-material>=9.5.3; extra == "docs"
36
+ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == "docs"
37
+ Provides-Extra: xml
38
+ Requires-Dist: lxml>=5.0.0; extra == "xml"
39
+ Dynamic: license-file
40
+
41
+ # glazing
42
+
43
+ A Python package providing unified data models and interfaces for four linguistic resources: FrameNet, PropBank, VerbNet, and WordNet.
44
+
45
+ ## Features
46
+
47
+ - Type-safe data models using Pydantic v2 for validation
48
+ - Support for FrameNet 1.7 semantic frames and annotations
49
+ - PropBank roleset and argument structure models
50
+ - VerbNet verb classes with thematic role inheritance
51
+ - WordNet 3.1 synsets and lexical relations
52
+ - Cross-dataset reference resolution and mapping
53
+ - Python 3.13+ with comprehensive type hints
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install glazing
59
+ ```
60
+
61
+ For development installation:
62
+
63
+ ```bash
64
+ git clone https://github.com/aaronstevenwhite/glazing.git
65
+ cd glazing
66
+ pip install -e ".[dev]"
67
+ ```
68
+
69
+ ## Basic Usage
70
+
71
+ ```python
72
+ from glazing import FrameNet, PropBank, VerbNet, WordNet
73
+
74
+ # Load datasets from JSON Lines
75
+ fn = FrameNet.load("data/framenet.jsonl")
76
+ pb = PropBank.load("data/propbank.jsonl")
77
+ vn = VerbNet.load("data/verbnet.jsonl")
78
+ wn = WordNet.load("data/wordnet.jsonl")
79
+
80
+ # Query by lemma
81
+ abandon_frames = fn.get_frames_by_lemma("abandon")
82
+ abandon_rolesets = pb.get_rolesets_by_lemma("abandon")
83
+ abandon_classes = vn.get_classes_by_lemma("abandon")
84
+ abandon_synsets = wn.get_synsets_by_lemma("abandon", pos="v")
85
+ ```
86
+
87
+ ## Data Formats
88
+
89
+ The package uses JSON Lines as the primary data format. Original XML and database formats are converted to JSON Lines during data preparation, enabling efficient lazy loading of large datasets.
90
+
91
+ ### Data Conversion
92
+
93
+ Convert source data to JSON Lines format:
94
+
95
+ ```python
96
+ from glazing.converters import convert_framenet, convert_propbank, convert_verbnet, convert_wordnet
97
+
98
+ # Convert from original formats
99
+ convert_framenet("framenet_v17/", "data/framenet.jsonl")
100
+ convert_propbank("propbank-frames/", "data/propbank.jsonl")
101
+ convert_verbnet("verbnet/", "data/verbnet.jsonl")
102
+ convert_wordnet("wn3.1/", "data/wordnet.jsonl")
103
+ ```
104
+
105
+ ## Cross-References
106
+
107
+ The package maintains cross-references between datasets:
108
+
109
+ ```python
110
+ from glazing.references import CrossRef
111
+
112
+ xref = CrossRef(fn, pb, vn, wn)
113
+
114
+ # Get related entries across datasets
115
+ related = xref.get_related("give.01", source="propbank")
116
+ print(related.verbnet_classes) # ['give-13.1']
117
+ print(related.framenet_frames) # ['Giving']
118
+ print(related.wordnet_senses) # ['give%2:40:00', 'give%2:40:01']
119
+ ```
120
+
121
+ ## Requirements
122
+
123
+ - Python 3.13+
124
+ - pydantic >= 2.5.0
125
+ - typing-extensions >= 4.9.0
126
+ - python-dateutil >= 2.8.2
127
+
128
+ ## Documentation
129
+
130
+ Full documentation is available at [https://glazing.readthedocs.io](https://glazing.readthedocs.io)
131
+
132
+ ## License
133
+
134
+ MIT License - see LICENSE file for details.
135
+
136
+ ## Citation
137
+
138
+ If you use this package in your research, please cite:
139
+
140
+ ```bibtex
141
+ @software{glazing2025,
142
+ author = {White, Aaron Steven},
143
+ title = {glazing: A Unified Interface for FrameNet, PropBank, VerbNet, and WordNet},
144
+ year = {2025},
145
+ url = {https://github.com/aaronstevenwhite/glazing}
146
+ }
147
+ ```
148
+
149
+ ## Contributing
150
+
151
+ Contributions are welcome. Please ensure all tests pass and code follows the project's style guidelines:
152
+
153
+ ```bash
154
+ # Run tests
155
+ pytest
156
+
157
+ # Check code style
158
+ ruff check src/ tests/
159
+
160
+ # Type checking
161
+ mypy src/
162
+ ```
163
+
164
+ ## Data Sources
165
+
166
+ This package provides models for data from:
167
+
168
+ - [FrameNet](https://framenet.icsi.berkeley.edu/)
169
+ - [PropBank](https://propbank.github.io/)
170
+ - [VerbNet](https://verbs.colorado.edu/verbnet/)
171
+ - [WordNet](https://wordnet.princeton.edu/)
@@ -0,0 +1,131 @@
1
+ # glazing
2
+
3
+ A Python package providing unified data models and interfaces for four linguistic resources: FrameNet, PropBank, VerbNet, and WordNet.
4
+
5
+ ## Features
6
+
7
+ - Type-safe data models using Pydantic v2 for validation
8
+ - Support for FrameNet 1.7 semantic frames and annotations
9
+ - PropBank roleset and argument structure models
10
+ - VerbNet verb classes with thematic role inheritance
11
+ - WordNet 3.1 synsets and lexical relations
12
+ - Cross-dataset reference resolution and mapping
13
+ - Python 3.13+ with comprehensive type hints
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install glazing
19
+ ```
20
+
21
+ For development installation:
22
+
23
+ ```bash
24
+ git clone https://github.com/aaronstevenwhite/glazing.git
25
+ cd glazing
26
+ pip install -e ".[dev]"
27
+ ```
28
+
29
+ ## Basic Usage
30
+
31
+ ```python
32
+ from glazing import FrameNet, PropBank, VerbNet, WordNet
33
+
34
+ # Load datasets from JSON Lines
35
+ fn = FrameNet.load("data/framenet.jsonl")
36
+ pb = PropBank.load("data/propbank.jsonl")
37
+ vn = VerbNet.load("data/verbnet.jsonl")
38
+ wn = WordNet.load("data/wordnet.jsonl")
39
+
40
+ # Query by lemma
41
+ abandon_frames = fn.get_frames_by_lemma("abandon")
42
+ abandon_rolesets = pb.get_rolesets_by_lemma("abandon")
43
+ abandon_classes = vn.get_classes_by_lemma("abandon")
44
+ abandon_synsets = wn.get_synsets_by_lemma("abandon", pos="v")
45
+ ```
46
+
47
+ ## Data Formats
48
+
49
+ The package uses JSON Lines as the primary data format. Original XML and database formats are converted to JSON Lines during data preparation, enabling efficient lazy loading of large datasets.
50
+
51
+ ### Data Conversion
52
+
53
+ Convert source data to JSON Lines format:
54
+
55
+ ```python
56
+ from glazing.converters import convert_framenet, convert_propbank, convert_verbnet, convert_wordnet
57
+
58
+ # Convert from original formats
59
+ convert_framenet("framenet_v17/", "data/framenet.jsonl")
60
+ convert_propbank("propbank-frames/", "data/propbank.jsonl")
61
+ convert_verbnet("verbnet/", "data/verbnet.jsonl")
62
+ convert_wordnet("wn3.1/", "data/wordnet.jsonl")
63
+ ```
64
+
65
+ ## Cross-References
66
+
67
+ The package maintains cross-references between datasets:
68
+
69
+ ```python
70
+ from glazing.references import CrossRef
71
+
72
+ xref = CrossRef(fn, pb, vn, wn)
73
+
74
+ # Get related entries across datasets
75
+ related = xref.get_related("give.01", source="propbank")
76
+ print(related.verbnet_classes) # ['give-13.1']
77
+ print(related.framenet_frames) # ['Giving']
78
+ print(related.wordnet_senses) # ['give%2:40:00', 'give%2:40:01']
79
+ ```
80
+
81
+ ## Requirements
82
+
83
+ - Python 3.13+
84
+ - pydantic >= 2.5.0
85
+ - typing-extensions >= 4.9.0
86
+ - python-dateutil >= 2.8.2
87
+
88
+ ## Documentation
89
+
90
+ Full documentation is available at [https://glazing.readthedocs.io](https://glazing.readthedocs.io)
91
+
92
+ ## License
93
+
94
+ MIT License - see LICENSE file for details.
95
+
96
+ ## Citation
97
+
98
+ If you use this package in your research, please cite:
99
+
100
+ ```bibtex
101
+ @software{glazing2025,
102
+ author = {White, Aaron Steven},
103
+ title = {glazing: A Unified Interface for FrameNet, PropBank, VerbNet, and WordNet},
104
+ year = {2025},
105
+ url = {https://github.com/aaronstevenwhite/glazing}
106
+ }
107
+ ```
108
+
109
+ ## Contributing
110
+
111
+ Contributions are welcome. Please ensure all tests pass and code follows the project's style guidelines:
112
+
113
+ ```bash
114
+ # Run tests
115
+ pytest
116
+
117
+ # Check code style
118
+ ruff check src/ tests/
119
+
120
+ # Type checking
121
+ mypy src/
122
+ ```
123
+
124
+ ## Data Sources
125
+
126
+ This package provides models for data from:
127
+
128
+ - [FrameNet](https://framenet.icsi.berkeley.edu/)
129
+ - [PropBank](https://propbank.github.io/)
130
+ - [VerbNet](https://verbs.colorado.edu/verbnet/)
131
+ - [WordNet](https://wordnet.princeton.edu/)
@@ -0,0 +1,161 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "glazing"
7
+ version = "0.0.1"
8
+ description = "A unified interface for FrameNet, PropBank, VerbNet, and WordNet"
9
+ readme = "README.md"
10
+ requires-python = ">=3.13"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Aaron Steven White", email = "aaron.white@rochester.edu"}
14
+ ]
15
+ keywords = ["nlp", "linguistics", "framenet", "propbank", "verbnet", "wordnet", "semantics", "lexicon"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Science/Research",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
23
+ "Topic :: Text Processing :: Linguistic",
24
+ "Typing :: Typed",
25
+ ]
26
+
27
+ dependencies = [
28
+ "pydantic>=2.5.0",
29
+ "typing-extensions>=4.9.0",
30
+ "python-dateutil>=2.8.2",
31
+ ]
32
+
33
+ [project.optional-dependencies]
34
+ dev = [
35
+ "ruff>=0.1.9",
36
+ "mypy>=1.8.0",
37
+ "pytest>=7.4.3",
38
+ "pytest-cov>=4.1.0",
39
+ "pytest-asyncio>=0.21.1",
40
+ "pre-commit>=3.6.0",
41
+ ]
42
+ docs = [
43
+ "mkdocs>=1.5.3",
44
+ "mkdocs-material>=9.5.3",
45
+ "mkdocstrings[python]>=0.24.0",
46
+ ]
47
+ xml = [
48
+ "lxml>=5.0.0", # For XML parsing if needed
49
+ ]
50
+
51
+ [project.urls]
52
+ "Homepage" = "https://github.com/aaronstevenwhite/glazing"
53
+ "Bug Reports" = "https://github.com/aaronstevenwhite/glazing/issues"
54
+ "Source" = "https://github.com/aaronstevenwhite/glazing"
55
+ "Documentation" = "https://glazing.readthedocs.io"
56
+
57
+ [tool.setuptools.packages.find]
58
+ where = ["src"]
59
+
60
+ [tool.ruff]
61
+ line-length = 100
62
+ target-version = "py312"
63
+ src = ["src", "tests"]
64
+
65
+ [tool.ruff.lint]
66
+ select = [
67
+ "E", # pycodestyle errors
68
+ "W", # pycodestyle warnings
69
+ "F", # pyflakes
70
+ "I", # isort
71
+ "B", # flake8-bugbear
72
+ "C90", # mccabe
73
+ "N", # pep8-naming
74
+ "UP", # pyupgrade
75
+ "YTT", # flake8-2020
76
+ "ANN", # flake8-annotations
77
+ "S", # flake8-bandit
78
+ "BLE", # flake8-blind-except
79
+ "FBT", # flake8-boolean-trap
80
+ "A", # flake8-builtins
81
+ "C4", # flake8-comprehensions
82
+ "DTZ", # flake8-datetimez
83
+ "EM", # flake8-errmsg
84
+ "ISC", # flake8-implicit-str-concat
85
+ "ICN", # flake8-import-conventions
86
+ "G", # flake8-logging-format
87
+ "PIE", # flake8-pie
88
+ "PT", # flake8-pytest-style
89
+ "Q", # flake8-quotes
90
+ "RET", # flake8-return
91
+ "SIM", # flake8-simplify
92
+ "TID", # flake8-tidy-imports
93
+ "ARG", # flake8-unused-arguments
94
+ "PTH", # flake8-use-pathlib
95
+ "ERA", # eradicate
96
+ "PD", # pandas-vet
97
+ "PGH", # pygrep-hooks
98
+ "PL", # pylint
99
+ "TRY", # tryceratops
100
+ "RUF", # ruff-specific rules
101
+ ]
102
+ ignore = [
103
+ "ANN101", # Missing type annotation for self
104
+ "ANN102", # Missing type annotation for cls
105
+ ]
106
+
107
+ [tool.ruff.lint.per-file-ignores]
108
+ "tests/*" = ["S101", "ANN", "ARG"]
109
+
110
+ [tool.ruff.lint.pydocstyle]
111
+ convention = "numpy"
112
+
113
+ [tool.mypy]
114
+ python_version = "3.13"
115
+ strict = true
116
+ warn_return_any = true
117
+ warn_unused_configs = true
118
+ disallow_untyped_defs = true
119
+ disallow_any_unimported = true
120
+ no_implicit_optional = true
121
+ check_untyped_defs = true
122
+ warn_redundant_casts = true
123
+ warn_unused_ignores = true
124
+ warn_no_return = true
125
+ follow_imports = "normal"
126
+ namespace_packages = true
127
+ show_error_codes = true
128
+ pretty = true
129
+
130
+ [[tool.mypy.overrides]]
131
+ module = "tests.*"
132
+ ignore_errors = true
133
+
134
+ [tool.pytest.ini_options]
135
+ minversion = "7.0"
136
+ testpaths = ["tests"]
137
+ python_files = ["test_*.py", "*_test.py"]
138
+ python_classes = ["Test*"]
139
+ python_functions = ["test_*"]
140
+ addopts = [
141
+ "--strict-markers",
142
+ "--tb=short",
143
+ "--cov=glazing",
144
+ "--cov-report=term-missing",
145
+ "--cov-report=html",
146
+ "--cov-report=xml",
147
+ ]
148
+
149
+ [tool.coverage.run]
150
+ source = ["src/glazing"]
151
+ omit = ["*/tests/*", "*/test_*.py"]
152
+
153
+ [tool.coverage.report]
154
+ exclude_lines = [
155
+ "pragma: no cover",
156
+ "def __repr__",
157
+ "if __name__ == .__main__.:",
158
+ "raise AssertionError",
159
+ "raise NotImplementedError",
160
+ "if TYPE_CHECKING:",
161
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,34 @@
1
+ """Unified interface for FrameNet, PropBank, VerbNet, and WordNet linguistic resources.
2
+
3
+ This package provides type-safe data models and utilities for working with
4
+ four major linguistic resources. All models use Pydantic v2 for validation
5
+ and support JSON Lines serialization.
6
+
7
+ Modules
8
+ -------
9
+ framenet
10
+ Models and utilities for FrameNet semantic frames.
11
+ propbank
12
+ Models and utilities for PropBank rolesets.
13
+ verbnet
14
+ Models and utilities for VerbNet verb classes.
15
+ wordnet
16
+ Models and utilities for WordNet synsets and relations.
17
+ references
18
+ Cross-reference resolution between datasets.
19
+ utils
20
+ Shared utilities and helper functions.
21
+
22
+ Examples
23
+ --------
24
+ >>> from frames import FrameNet, PropBank, VerbNet, WordNet
25
+ >>> fn = FrameNet.load("data/framenet.jsonl")
26
+ >>> frames = fn.get_frames_by_lemma("give")
27
+ """
28
+
29
+ from frames.__version__ import __version__, __version_info__
30
+
31
+ __all__ = [
32
+ "__version__",
33
+ "__version_info__",
34
+ ]
@@ -0,0 +1,4 @@
1
+ """Version information for the glazing package."""
2
+
3
+ __version__ = "0.0.1"
4
+ __version_info__ = tuple(int(i) for i in __version__.split("."))
@@ -0,0 +1,31 @@
1
+ """FrameNet data models and utilities.
2
+
3
+ This module provides models for FrameNet semantic frames, frame elements,
4
+ lexical units, and their relationships. It supports the complete FrameNet
5
+ annotation model including multi-layer annotations and valence patterns.
6
+
7
+ Classes
8
+ -------
9
+ Frame
10
+ A semantic frame representing a schematic situation.
11
+ FrameElement
12
+ A participant or prop in a frame.
13
+ LexicalUnit
14
+ A word or phrase that evokes a frame.
15
+ FrameRelation
16
+ Relationships between frames.
17
+
18
+ Functions
19
+ ---------
20
+ load
21
+ Load FrameNet data from JSON Lines.
22
+
23
+ Examples
24
+ --------
25
+ >>> from frames.framenet import load
26
+ >>> fn = load("data/framenet.jsonl")
27
+ >>> frame = fn.get_frame("Giving")
28
+ >>> print(frame.definition)
29
+ """
30
+
31
+ __all__: list[str] = []
@@ -0,0 +1,31 @@
1
+ """PropBank data models and utilities.
2
+
3
+ This module provides models for PropBank framesets, rolesets, semantic roles,
4
+ and their mappings to other resources. It includes support for argument
5
+ structure and lexical links with confidence scores.
6
+
7
+ Classes
8
+ -------
9
+ Frameset
10
+ Container for all senses of a predicate.
11
+ Roleset
12
+ A single sense of a predicate with its semantic roles.
13
+ Role
14
+ Semantic role definition with argument number and description.
15
+ RoleLink
16
+ Link from a role to VerbNet or FrameNet.
17
+
18
+ Functions
19
+ ---------
20
+ load
21
+ Load PropBank data from JSON Lines.
22
+
23
+ Examples
24
+ --------
25
+ >>> from frames.propbank import load
26
+ >>> pb = load("data/propbank.jsonl")
27
+ >>> roleset = pb.get_roleset("give.01")
28
+ >>> print(roleset.roles)
29
+ """
30
+
31
+ __all__: list[str] = []
@@ -0,0 +1,30 @@
1
+ """Cross-reference models and resolution utilities.
2
+
3
+ This module provides models and utilities for managing cross-references
4
+ between FrameNet, PropBank, VerbNet, and WordNet. It includes confidence
5
+ scoring, transitive mapping resolution, and conflict detection.
6
+
7
+ Classes
8
+ -------
9
+ CrossReference
10
+ A mapping between entities in different datasets.
11
+ MappingConfidence
12
+ Confidence scoring for mappings.
13
+ UnifiedLemma
14
+ A lemma with representations across all datasets.
15
+ MappingIndex
16
+ Bidirectional index for fast mapping lookups.
17
+
18
+ Functions
19
+ ---------
20
+ resolve_references
21
+ Resolve cross-references between datasets.
22
+
23
+ Examples
24
+ --------
25
+ >>> from frames.references import CrossRef
26
+ >>> xref = CrossRef(fn, pb, vn, wn)
27
+ >>> mappings = xref.get_mappings("give", source="verbnet")
28
+ """
29
+
30
+ __all__: list[str] = []
@@ -0,0 +1,29 @@
1
+ """Shared utilities and helper functions.
2
+
3
+ This module provides common utilities used across the package including
4
+ XML parsing, validation, caching, and data conversion helpers.
5
+
6
+ Functions
7
+ ---------
8
+ parse_xml
9
+ Parse XML with namespace handling.
10
+ validate_schema
11
+ Validate data against XSD or DTD schemas.
12
+ create_cache
13
+ Create an LRU cache for query results.
14
+
15
+ Classes
16
+ -------
17
+ LazyLoader
18
+ Lazy loading for large datasets.
19
+ DataCache
20
+ Caching layer for frequently accessed data.
21
+
22
+ Examples
23
+ --------
24
+ >>> from frames.utils import LazyLoader
25
+ >>> loader = LazyLoader("data/large_dataset.json")
26
+ >>> item = loader.get_item(123) # Loads on demand
27
+ """
28
+
29
+ __all__: list[str] = []
@@ -0,0 +1,31 @@
1
+ """VerbNet data models and utilities.
2
+
3
+ This module provides models for VerbNet verb classes, thematic roles,
4
+ syntactic frames, and semantic predicates. It includes support for the
5
+ complete role inheritance hierarchy and optional Generative Lexicon features.
6
+
7
+ Classes
8
+ -------
9
+ VerbClass
10
+ A verb class with members, roles, and frames.
11
+ Member
12
+ Individual verb with cross-references.
13
+ ThematicRole
14
+ Semantic role with selectional restrictions.
15
+ VNFrame
16
+ Syntactic-semantic frame pattern.
17
+
18
+ Functions
19
+ ---------
20
+ load
21
+ Load VerbNet data from JSON Lines.
22
+
23
+ Examples
24
+ --------
25
+ >>> from frames.verbnet import load
26
+ >>> vn = load("data/verbnet.json")
27
+ >>> verb_class = vn.get_class("give-13.1")
28
+ >>> print(verb_class.themroles)
29
+ """
30
+
31
+ __all__: list[str] = []
@@ -0,0 +1,31 @@
1
+ """WordNet data models and utilities.
2
+
3
+ This module provides models for WordNet synsets, word senses, lexical and
4
+ semantic relations. It supports the complete WordNet 3.1 database structure
5
+ including morphological processing and relation traversal.
6
+
7
+ Classes
8
+ -------
9
+ Synset
10
+ A set of cognitive synonyms representing a concept.
11
+ Word
12
+ A lemma within a synset.
13
+ Sense
14
+ A word-meaning pair with sense key.
15
+ Pointer
16
+ A relation to another synset or word.
17
+
18
+ Functions
19
+ ---------
20
+ load
21
+ Load WordNet data from JSON Lines.
22
+
23
+ Examples
24
+ --------
25
+ >>> from frames.wordnet import load
26
+ >>> wn = load("data/wordnet.json")
27
+ >>> synset = wn.get_synset("02084442") # dog.n.01
28
+ >>> print(synset.gloss)
29
+ """
30
+
31
+ __all__: list[str] = []
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: glazing
3
+ Version: 0.0.1
4
+ Summary: A unified interface for FrameNet, PropBank, VerbNet, and WordNet
5
+ Author-email: Aaron Steven White <aaron.white@rochester.edu>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/aaronstevenwhite/glazing
8
+ Project-URL: Bug Reports, https://github.com/aaronstevenwhite/glazing/issues
9
+ Project-URL: Source, https://github.com/aaronstevenwhite/glazing
10
+ Project-URL: Documentation, https://glazing.readthedocs.io
11
+ Keywords: nlp,linguistics,framenet,propbank,verbnet,wordnet,semantics,lexicon
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
18
+ Classifier: Topic :: Text Processing :: Linguistic
19
+ Classifier: Typing :: Typed
20
+ Requires-Python: >=3.13
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: pydantic>=2.5.0
24
+ Requires-Dist: typing-extensions>=4.9.0
25
+ Requires-Dist: python-dateutil>=2.8.2
26
+ Provides-Extra: dev
27
+ Requires-Dist: ruff>=0.1.9; extra == "dev"
28
+ Requires-Dist: mypy>=1.8.0; extra == "dev"
29
+ Requires-Dist: pytest>=7.4.3; extra == "dev"
30
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
31
+ Requires-Dist: pytest-asyncio>=0.21.1; extra == "dev"
32
+ Requires-Dist: pre-commit>=3.6.0; extra == "dev"
33
+ Provides-Extra: docs
34
+ Requires-Dist: mkdocs>=1.5.3; extra == "docs"
35
+ Requires-Dist: mkdocs-material>=9.5.3; extra == "docs"
36
+ Requires-Dist: mkdocstrings[python]>=0.24.0; extra == "docs"
37
+ Provides-Extra: xml
38
+ Requires-Dist: lxml>=5.0.0; extra == "xml"
39
+ Dynamic: license-file
40
+
41
+ # glazing
42
+
43
+ A Python package providing unified data models and interfaces for four linguistic resources: FrameNet, PropBank, VerbNet, and WordNet.
44
+
45
+ ## Features
46
+
47
+ - Type-safe data models using Pydantic v2 for validation
48
+ - Support for FrameNet 1.7 semantic frames and annotations
49
+ - PropBank roleset and argument structure models
50
+ - VerbNet verb classes with thematic role inheritance
51
+ - WordNet 3.1 synsets and lexical relations
52
+ - Cross-dataset reference resolution and mapping
53
+ - Python 3.13+ with comprehensive type hints
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install glazing
59
+ ```
60
+
61
+ For development installation:
62
+
63
+ ```bash
64
+ git clone https://github.com/aaronstevenwhite/glazing.git
65
+ cd glazing
66
+ pip install -e ".[dev]"
67
+ ```
68
+
69
+ ## Basic Usage
70
+
71
+ ```python
72
+ from glazing import FrameNet, PropBank, VerbNet, WordNet
73
+
74
+ # Load datasets from JSON Lines
75
+ fn = FrameNet.load("data/framenet.jsonl")
76
+ pb = PropBank.load("data/propbank.jsonl")
77
+ vn = VerbNet.load("data/verbnet.jsonl")
78
+ wn = WordNet.load("data/wordnet.jsonl")
79
+
80
+ # Query by lemma
81
+ abandon_frames = fn.get_frames_by_lemma("abandon")
82
+ abandon_rolesets = pb.get_rolesets_by_lemma("abandon")
83
+ abandon_classes = vn.get_classes_by_lemma("abandon")
84
+ abandon_synsets = wn.get_synsets_by_lemma("abandon", pos="v")
85
+ ```
86
+
87
+ ## Data Formats
88
+
89
+ The package uses JSON Lines as the primary data format. Original XML and database formats are converted to JSON Lines during data preparation, enabling efficient lazy loading of large datasets.
90
+
91
+ ### Data Conversion
92
+
93
+ Convert source data to JSON Lines format:
94
+
95
+ ```python
96
+ from glazing.converters import convert_framenet, convert_propbank, convert_verbnet, convert_wordnet
97
+
98
+ # Convert from original formats
99
+ convert_framenet("framenet_v17/", "data/framenet.jsonl")
100
+ convert_propbank("propbank-frames/", "data/propbank.jsonl")
101
+ convert_verbnet("verbnet/", "data/verbnet.jsonl")
102
+ convert_wordnet("wn3.1/", "data/wordnet.jsonl")
103
+ ```
104
+
105
+ ## Cross-References
106
+
107
+ The package maintains cross-references between datasets:
108
+
109
+ ```python
110
+ from glazing.references import CrossRef
111
+
112
+ xref = CrossRef(fn, pb, vn, wn)
113
+
114
+ # Get related entries across datasets
115
+ related = xref.get_related("give.01", source="propbank")
116
+ print(related.verbnet_classes) # ['give-13.1']
117
+ print(related.framenet_frames) # ['Giving']
118
+ print(related.wordnet_senses) # ['give%2:40:00', 'give%2:40:01']
119
+ ```
120
+
121
+ ## Requirements
122
+
123
+ - Python 3.13+
124
+ - pydantic >= 2.5.0
125
+ - typing-extensions >= 4.9.0
126
+ - python-dateutil >= 2.8.2
127
+
128
+ ## Documentation
129
+
130
+ Full documentation is available at [https://glazing.readthedocs.io](https://glazing.readthedocs.io)
131
+
132
+ ## License
133
+
134
+ MIT License - see LICENSE file for details.
135
+
136
+ ## Citation
137
+
138
+ If you use this package in your research, please cite:
139
+
140
+ ```bibtex
141
+ @software{glazing2025,
142
+ author = {White, Aaron Steven},
143
+ title = {glazing: A Unified Interface for FrameNet, PropBank, VerbNet, and WordNet},
144
+ year = {2025},
145
+ url = {https://github.com/aaronstevenwhite/glazing}
146
+ }
147
+ ```
148
+
149
+ ## Contributing
150
+
151
+ Contributions are welcome. Please ensure all tests pass and code follows the project's style guidelines:
152
+
153
+ ```bash
154
+ # Run tests
155
+ pytest
156
+
157
+ # Check code style
158
+ ruff check src/ tests/
159
+
160
+ # Type checking
161
+ mypy src/
162
+ ```
163
+
164
+ ## Data Sources
165
+
166
+ This package provides models for data from:
167
+
168
+ - [FrameNet](https://framenet.icsi.berkeley.edu/)
169
+ - [PropBank](https://propbank.github.io/)
170
+ - [VerbNet](https://verbs.colorado.edu/verbnet/)
171
+ - [WordNet](https://wordnet.princeton.edu/)
@@ -0,0 +1,16 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/glazing/__init__.py
5
+ src/glazing/__version__.py
6
+ src/glazing.egg-info/PKG-INFO
7
+ src/glazing.egg-info/SOURCES.txt
8
+ src/glazing.egg-info/dependency_links.txt
9
+ src/glazing.egg-info/requires.txt
10
+ src/glazing.egg-info/top_level.txt
11
+ src/glazing/framenet/__init__.py
12
+ src/glazing/propbank/__init__.py
13
+ src/glazing/references/__init__.py
14
+ src/glazing/utils/__init__.py
15
+ src/glazing/verbnet/__init__.py
16
+ src/glazing/wordnet/__init__.py
@@ -0,0 +1,19 @@
1
+ pydantic>=2.5.0
2
+ typing-extensions>=4.9.0
3
+ python-dateutil>=2.8.2
4
+
5
+ [dev]
6
+ ruff>=0.1.9
7
+ mypy>=1.8.0
8
+ pytest>=7.4.3
9
+ pytest-cov>=4.1.0
10
+ pytest-asyncio>=0.21.1
11
+ pre-commit>=3.6.0
12
+
13
+ [docs]
14
+ mkdocs>=1.5.3
15
+ mkdocs-material>=9.5.3
16
+ mkdocstrings[python]>=0.24.0
17
+
18
+ [xml]
19
+ lxml>=5.0.0
@@ -0,0 +1 @@
1
+ glazing