Summary objects
Wordcab API Summary object.
BaseSummary
dataclass
Summary object.
Source code in src/wordcab/core_objects/summary.py
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
|
__post_init__()
Post init.
Source code in src/wordcab/core_objects/summary.py
get_formatted_summaries(add_context=False)
Format the summaries in an human readable format.
Return the summaries as a dictionary in an human readable format with the summary length as key and the summaries as values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
add_context |
bool
|
If True, add the context items to the summary, by default False. |
False
|
Returns:
Type | Description |
---|---|
Dict[str, str]
|
The summaries as a dictionary with the summary length as key and the summaries as values formatted in an human readable format. |
Source code in src/wordcab/core_objects/summary.py
get_summaries()
Get the summaries as a dictionary with the summary length as key and the summaries as values.
Returns:
Type | Description |
---|---|
Dict[str, List[Union[str, List[str]]]]
|
The summaries as a dictionnary with the summary length as key and the summaries as values. If the summary type is brief, the summaries are returned as a list of list of str, otherwise they are returned as a list of str. |
Source code in src/wordcab/core_objects/summary.py
ListSummaries
dataclass
StructuredSummary
dataclass
Structured summary object.
Source code in src/wordcab/core_objects/summary.py
__repr__()
Return a string representation of the object without the None values.
Created: 2023-09-25