Skip to content

Commit 70e019f

Browse files
Enhances the __init__.py file with a comprehensive module description for graph corpus management. Introduces detailed class and type alias documentation, improving clarity and usability for developers implementing corpus readers in the decomp framework.
1 parent 86035e6 commit 70e019f

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

decomp/corpus/__init__.py

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1-
"""Module for defining abstract corpus readers"""
1+
"""Abstract base classes for graph corpus management.
22
3-
from .corpus import *
3+
This module provides the foundation for reading and managing collections of graphs
4+
in the decomp framework. It defines abstract interfaces that are implemented by
5+
concrete corpus readers for specific graph types.
6+
7+
The primary class is :class:`~decomp.corpus.Corpus`, which serves as a generic
8+
container for managing collections of graphs. It handles the conversion from raw
9+
input graphs to processed output graphs through an abstract graph builder method.
10+
11+
Classes
12+
-------
13+
Corpus
14+
Abstract base class for graph corpus containers that manages collections
15+
of graphs and provides dictionary-like access to them.
16+
17+
Type Aliases
18+
------------
19+
GraphDict
20+
Type alias for a dictionary mapping hashable identifiers to output graphs.
21+
22+
Type Variables
23+
--------------
24+
InGraph
25+
Type variable representing the input graph format that will be processed
26+
by the corpus reader's graph builder.
27+
28+
OutGraph
29+
Type variable representing the output graph format produced by the corpus
30+
reader after processing.
31+
32+
Notes
33+
-----
34+
The corpus module provides the foundation for various specialized corpus readers
35+
in the decomp framework, including dependency syntax corpora and semantic graph
36+
corpora like UDS and PredPatt.
37+
"""
38+
39+
from .corpus import Corpus, GraphDict, InGraph, OutGraph
40+
41+
42+
__all__ = ['Corpus', 'GraphDict', 'InGraph', 'OutGraph']

0 commit comments

Comments
 (0)