ontometer_corpus.steps.abstractness_panel¶
Abstractness across releases of the same ontology.
Registries keep release histories: OntoPortal submissions and LOV versions are
each fetched and parsed rows, grouped into release families by
ontometer_corpus.versions. This script measures every selected release on
its own terms — its own hierarchy, its own role table — so the trajectory of
one ontology is not confounded by the rest of the corpus changing around it.
Runs after ontometer-corpus entity-network. Needs --store (or
$ONTOMETER_STORE) for both steps. Three commands, in order:
ontometer-corpus panel select --store /path/to/ontologies
ontometer-corpus entity-roles --panel --store /path/to/ontologies
ontometer-corpus panel measure --store /path/to/ontologies
select reads <corpus>/corpus.db and
$ONTOMETER_STORE/cache/entity_ontologies.parquet and writes
$ONTOMETER_STORE/cache/panel_releases.parquet. It keeps families of the
entity network with at least two dated releases of distinct content, and at
most --per-family releases each, spread evenly over the family's history
(first and last always kept).
entity_roles.py --panel writes the role tables of the selected releases
under $ONTOMETER_STORE/cache/roles/v<N>/ and their coverage table
$ONTOMETER_STORE/cache/roles_summary_panel.parquet.
measure reads the panel, $ONTOMETER_STORE/cache/entity_terms.parquet,
each release's sidecar under $ONTOMETER_STORE/cache/structure/v<N>/ and its role table
where there is one, and writes <corpus>/abstractness_panel.parquet. A
selected release whose sidecar is missing is recorded with ok false and
not measured (the parse phase writes a sidecar for every parsed row). Without
a role table, roles come from the sidecar's declarations and subclass edges.
measure computes, per release, over the terms homed in the family's
namespaces (as assigned in the static network):
A_local— mean generality1 - ICof the home classes in the release's own hierarchy, andA_null— the same after replacing the growth since the previous release with the same number of classes attached as random leaves. Adding leaves mechanically shifts IC, so the claim that abstraction rises is judged byA_local - A_null, not byA_localalone.class_share/instance_share/punned_shareof home terms (sense C);- between consecutive releases: promotions (a term used only as an instance becomes a class), demotions, and abstractions (a home class that was a leaf gains subclasses, or a new class appears above existing ones).
Attributes¶
Classes¶
Functions:¶
select(paths, per_family)
¶
Source code in ontometer_corpus/steps/abstractness_panel.py
measure(paths, seed)
¶
Source code in ontometer_corpus/steps/abstractness_panel.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | |
main()
¶
Abstractness across releases of the same ontology.
Run select, then entity_roles.py --panel, then measure.
select_command(per_family, paths)
¶
Choose releases per family, spread over its history.
Source code in ontometer_corpus/steps/abstractness_panel.py
measure_command(seed, paths)
¶
Compute abstractness per selected release.