ontometer_corpus.steps.abstractness_growth¶
Abstractness as the corpus grows: G(t).
The specialisation network of ontologies is a function of time. An ontology that nothing specialises is terminal — a leaf of the network. When a later ontology specialises one of its classes it becomes a branch, and in the network sense it has become more abstract. This script reconstructs G(t) and measures that process.
Reconstruction. The network is the one measured at capture: child →
parent when a class homed in child is asserted, by child, under a
class homed in parent (own-foreign edges, ontometer-corpus entity-network). Each
ontology is placed in time by its first-evidence date (ontometer-corpus dates).
A specialisation pair (child, parent) is placed at the first release of the
child that asserts it when the child's releases are in the release panel
(ontometer-corpus panel, used only if
$ONTOMETER_STORE/cache/panel_releases.parquet exists), and otherwise at the
child's first evidence —
an assumption the panel measures (the share of pairs already asserted in a
family's first panel release). It never predates its parent. Two birth
variants are measured:
bounded(primary): the first-evidence date, further bounded by the rule that a class exists before anything specialises it, so an ontology is born no later than the first observed specialisation of one of its classes — the first panel release asserting it, or the captured release that does (bound_births); an undated parent with a dated observation becomes dated.first_evidence: the first-evidence date alone.
Measured, per variant:
- dating consistency — the share of specialisations whose child is born no earlier than its parent, against a permutation of the dates;
- leaf survival — time from birth to the first specialiser (Kaplan–Meier, censored at capture). Ontologies already specialised when first attested are counted apart: the data cannot say when they stopped being leaves;
- the corpus over calendar time — how many ontologies exist, the share that are
branches, normalised network generality
log(1 + specialisers) / log N(t)and height (longest chain of specialisers beneath), for all ontologies, for the measured ontologies (subject), and for fixed cohorts, so that change within existing ontologies is separated from the arrival of new, terminal ones; - attachment — whether specialisations spread over existing ontologies or
concentrate: the number of leaves that became branches against the same
arrivals re-targeted uniformly and preferentially (
attachment_null); - who becomes a branch — content abstractness (
A_local) of ontologies specialised within five years of birth against those that were not, net of ontology size; - terms — home classes gaining a first foreign specialiser, over time;
- sense C over time — for terms used by other ontologies, whether later users use them as classes more than earlier users do.
$ONTOMETER_STORE/cache/entity_{ontologies,terms,edges,docs}.parquet,
<corpus>/ontology_abstractness.parquet,
<corpus>/ontology_dates.parquet, and, when
$ONTOMETER_STORE/cache/panel_releases.parquet exists, the panel
releases' sidecars under $ONTOMETER_STORE/cache/structure/v<N>/.
Runs after: ontometer-corpus abstractness and ontometer-corpus dates; optionally
ontometer-corpus panel select.
Needs --store (or $ONTOMETER_STORE).
Usage
ontometer-corpus growth --store /path/to/ontologies --out /path/to/out
Attributes¶
BASE_YEARS = (2010, 2015, 2020)
module-attribute
¶
Classes¶
GrowthInputs
dataclass
¶
The ontology specialisation network at capture, placed in time.
dep holds one row per (child, parent) pair with n_terms, the
number of term-level specialisations behind it. eps is each pair's
arrival time (first panel release asserting it, else the child's first
evidence); b_obs and b_bnd are first-evidence and bounded births,
in days since the epoch, indexed by ontology.
Source code in ontometer_corpus/steps/abstractness_growth.py
Attributes¶
onts
instance-attribute
¶
onto
instance-attribute
¶
terms
instance-attribute
¶
edges
instance-attribute
¶
dates
instance-attribute
¶
dep
instance-attribute
¶
b_obs
instance-attribute
¶
b_bnd
instance-attribute
¶
eps
instance-attribute
¶
by_panel
instance-attribute
¶
panel_check
instance-attribute
¶
as_of
instance-attribute
¶
term_home
property
¶
pair_time
property
¶
Methods:¶
__init__(onts, onto, terms, edges, dates, dep, b_obs, b_bnd, eps, by_panel, panel_check, as_of)
¶
Functions:¶
load_timed_network(paths)
¶
Load the entity network and date its ontologies and specialisation pairs.
Source code in ontometer_corpus/steps/abstractness_growth.py
build(paths, out, reps, seed)
¶
Source code in ontometer_corpus/steps/abstractness_growth.py
715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 | |
main(out, reps, seed, paths)
¶
Abstractness as the corpus grows: G(t).