Skip to content

A course in project knowledge reuse

The handover chair at fictional Merebridge Station needs to decide which earlier lessons belong on the agenda for its passenger-information displays. A familiar fault description might concern a different interface. A note with the right asset name might record an untested suggestion. What would let the chair tell the difference?

Michael K. Bergman’s Cooking with Python and KBpedia supplies 65 ways into this problem. Each row pairs an original instalment with a proposed station task and something a colleague could inspect. The first 13 links open Bergman’s articles. Links 14–65 open the corresponding notebooks in Cognonto’s repository. Some of those notebooks teach through prose, including the project-planning and round-trip design chapters.

Essai 01 adapts techniques from steps 19 and 22–25. The team inspects a local RDF graph, looks up labels, runs the published SPARQL query and checks each proposed lesson against its source. Those five rows link to the part of the run you can inspect. All 65 station tasks are proposals. They describe what a future reader could try, including further work on those same five topics. Exact query · Results and source extracts

Essai 02 brings a related question from Lawrence’s 2023 portfolio work. It uses Tomaž Bratanič’s Cypher approach to test how a model handles the project name, the recorded relationship and the type of the answer. This provides a comparison for the label and query work in this course. The CWPK station exercises retain their own evidence and coverage.

Lawrence edited the original notebooks for steps 17–25 in November 2020. The table links to Bergman’s source material for each step. Rows marked “Essai 01” show which techniques the first essai applies to the station records.

Opening · 1–2Frame the review

Original instalmentTry at MerebridgeEvidence to inspect
1. Cooking with Python and KBpediaWrite the chair’s decision in one sentence. Which lessons from earlier display handovers deserve time at Merebridge’s review?A decision note naming the chair, meeting and proposed output.
2. What to ExpectAgree what makes an earlier lesson worth discussing. Try the rule on one plausible lesson and one misleading match.Two examples with a reason for putting each on the agenda or holding it back.

Back to course contents

Part I · 3–15Set up and inspect the starting material

Original instalmentTry at MerebridgeEvidence to inspect
3. Clojure v R v PythonCompare ways to read the same small lessons register. Record why the project would choose Python, R or another tool.A tool choice tied to something the reviewer needs to reproduce.
4. The Baseline ArchitectureTrace how one handover observation would travel from its source note into a query result and then onto the agenda.A diagram with an identifier at each handoff and a route back to the source.
5. Overview and Installation of ProtégéOpen the station vocabulary in an ontology editor. Locate the class for a display, the class for a test and the relationship between them.An annotated view identifying both classes and the property that connects them.
6. Initial KBpedia InspectionInspect one display record by hand before writing a query. Find its identifier, label, cited source and any missing fields.One source-checked record against which to compare the first query.
7. Getting Familiar with KBpedia FilesInventory the lesson register, vocabulary, evidence extracts and graph exports. Decide which file governs each field.A manifest giving each file’s purpose, version and owner.
8. Getting Familiar with the KBpedia StructureSketch how asset, interface, test and lesson fit together. Try placing a passenger-information display and its acceptance test in the sketch.A small vocabulary diagram and two classified examples.
9. Installing PythonPrepare a Python environment that can read a small copy of the station graph.An environment version and a successful count of records in the fixture.
10. Installing a Project NotebookSet up a notebook whose first cell loads the Merebridge fixture from a documented location.A clean start that returns the expected fixture identifier.
11. Installing a Python IDEStep through a lookup in a development environment. Inspect what happens when a lesson names a source that is absent.A repeatable missing-source case and the location where the lookup reports it.
12. A Brief Pause to Learn Some PythonWrite a short filter for earlier lessons that identify both an asset and a source record.A tiny input table with the expected included and excluded rows.
13. Managing Python Packages and EnvironmentsRecord dependencies and rebuild the environment. Rerun the same fixture lookup on the rebuilt environment.The dependency specification and matching results from the two runs.
14. Markdown and Anatomy of a Notebook FilePut the handover question, input version, query and answer in separate notebook cells.A reader can locate the evidence and rerun the answer without editing the prose.
15. Using Notebooks for CWPK DocumentationDocument a failed search next to a successful one. Explain what changed in the search.A worked page with both result sets and the inputs needed to reproduce them.

Back to course contents

Part II · 16–26Load the graph and ask it questions

Original instalmentTry at MerebridgeEvidence to inspect
16. Planning the ProjectPlan one enquiry into display handover. Name the agenda decision, available earlier projects, missing evidence and stopping point.A one-page scope with a decision owner and a criterion for finishing.
17. Choosing and Installing an OWL APIChoose an OWL interface and load the station vocabulary from a fixed local version.A reported ontology identifier and version that agree with the manifest.
18. Basic Terminology and Load KBpediaDistinguish an asset class, a particular display, a property and a literal label. Check each after loading the graph.Four examples whose identifiers resolve to the intended kinds of thing.
19. Exploring the API to OWL
Essai 01 · inspect the local graph
Explore which namespace supplies each class and label. Trace a display from its local name to its full identifier.An import list and a lookup that still works when another vocabulary uses the same short name.
20. Basic Knowledge Graph Management – IAdd a type for a display commissioning check to a working graph. Reopen the graph and inspect its parent class.A before-and-after class listing and a persisted example check.
21. Some Accumulated TipsRestart with an empty session and repeat a successful lookup using explicit paths and namespaces.A short repeatable recipe and a record of any hidden dependency it exposed.
22. Basic Knowledge Graph Management – II
Essai 01 · inspect the alternative labels
Give a display one preferred label and an alternative used by a subcontractor. Inspect which asset owns both labels.An identifier shared by the two labels, with a separate example of a similar label on a different asset.
23. Text Searching KBpedia
Essai 01 · compare literal and alias matches
Search earlier notes for a display term, its alternate wording and an ambiguous term. Compare which records each retrieves.Three result lists checked against the source notes, including one misleading hit.
24. Introduction to RDFLib
Essai 01 · trace the RDF load and result processing
Read a local RDF graph and follow a retrieved lesson to its evidence record.The exact triples supporting one result and the corresponding passage in its source.
25. Querying KBpedia with SPARQL
Essai 01 · read the exact query
Ask which earlier lessons match the review topic and cite a source the chair can inspect. Preserve the exact SPARQL query.Query text, input version, returned lesson IDs and a source check for each proposed agenda item.
26. Introduction to Knowledge Graph ReasonersGive an OWL reasoner a small station model with an intentional clash between two disjoint asset types. Repair the classification.The explanation for the clash and a second run showing the effect of the repair.

Back to course contents

Part III · 27–36Extract a register that people can edit

Original instalmentTry at MerebridgeEvidence to inspect
27. A ‘Roundtrip’ PhilosophySpecify what must survive a graph-to-register-to-graph journey. Select a question whose answer matters to the chair.A list of invariants and a saved answer for later comparison.
28. Extracting Structure for TypologiesExtract the hierarchy of display assets and test types to an editable register.A parent–child table in which every exported identifier resolves to its source class.
29. Extracting Object and Data PropertiesExtract relationships such as ‘tests asset’ separately from values such as the recorded test date.Two tables with their expected object types or literal datatypes.
30. Extracting AnnotationsExtract preferred labels, alternate labels and source notes without losing their attachment to the right lesson.An annotation table checked against two records with similar names.
31. Reading and Writing FilesWrite and read back a register containing punctuation, a line break and an empty evidence field.A round-trip comparison showing which values survived exactly.
32. Iterating Over a Full ExtractionRun the extraction across all the station fixture’s record types and reconcile the result.Counts by type plus a list of any identifiers missing from the export.
33. A Python Package, Part I: The Annotation ExtractorPackage the annotation extractor so a second lessons register can use the same routine.A reusable command and a checked output for the second register.
34. A Python Module, Part II: Packaging and The Structure ExtractorPackage structure extraction separately. Change a label and check whether the class hierarchy changes.A before-and-after hierarchy comparison showing the effect of the edit.
35. A Python Module, Part III: Custom Extractions and Finish PackagingPrepare an extraction limited to display interfaces and the lessons that cite them.A bounded export with the inclusion rule and a checked example just outside its scope.
36. Bulk Modification TechniquesRehearse a bulk rename against the extracted register. Preserve the supplier’s old display term as an alias.A reviewable change list and a check that the old term still finds the same asset.

Back to course contents

Part IV · 37–48Rebuild and test the handover graph

Original instalmentTry at MerebridgeEvidence to inspect
37. Organizing the Code BaseOrganise source records, editable registers, build routines and generated outputs so the next reviewer can repeat the build.A directory guide naming the input and generated copy for one lesson.
38. Stubs and Starting FilesDefine a minimal station ontology and starting files containing one asset, one check and one lesson.A small fixture with declared identifiers and the relationships it is expected to support.
39. I/O and Structural IngestBuild the first class hierarchy from the station register in a fresh workspace.The rebuilt class and its expected parent, verified by identifier.
40. Looping and Multiple Structure File IngestLoad separate asset, interface and test registers in a defined order. Try one row with an undeclared parent.A build log locating the offending row and a successful rebuild after correction.
41. Optimizations and Property Structure IngestAdd property definitions and measure the cost of loading a larger fixture.A checked property lookup plus timings on two defined input sizes.
42. Other Structural ConsiderationsResolve a display that belongs to two valid categories. Check how both paths affect a topic search.A hierarchy extract retaining both parents and a result list with one entry for the display.
43. Logic Testing of the Knowledge Graph StructureTest the rebuilt graph for incompatible classifications. Compare a sound fixture with a deliberately contradictory one.A reasoner report that identifies the injected contradiction.
44. Annotation IngestRestore labels, source citations and review comments after building the graph structure.The same lesson ID retrieves each annotation recorded before extraction.
45. Cleaning and File Pre-checksPre-check edited registers for duplicate IDs, empty keys and dangling references.An error report with the input row for each deliberately introduced defect.
46. Creating the cowpoke Package and Unit TestsPut the rebuild and its checks into a tested package, following the role of Cognonto’s cowpoke routines.A clean run of the smallest good fixture and a test that catches a known bad one.
47. Summary of the Extract-Build RoundtripComplete the extract, edit and rebuild cycle. Ask the chair’s saved agenda question again.Two result lists and an explanation of every changed answer, including the intended edit.
48. Case Study: A Sweeping RefactoringSplit an overloaded ‘display fault’ category into equipment, configuration and evidence issues. Retest the old queries.A migration table and a review of agenda items that gained, lost or changed a classification.

Back to course contents

Part V · 49–60Connect records and publish useful views

Original instalmentTry at MerebridgeEvidence to inspect
49. Mapping External SourcesMap supplier equipment IDs to the operator’s asset register. Record whether each match is exact, broader or provisional.A crosswalk containing a justified match and an unresolved candidate.
50. Querying External SourcesQuery the two registers for the same interface using its mapped identifiers.A reconciled result with the source system and retrieval date on each claim.
51. Distributed Interactions via Web Widgets - IBuild a small review widget to select an asset and inspect its linked earlier lessons.A reviewer can open the cited record from one displayed result.
52. Distributed Interactions via Web Widgets - IIAdd an interaction that lets a reviewer flag a doubtful match and capture the reason.A recorded review decision that remains attached to the original match.
53. Intro to Other ToolsCompare two tools for a recurring job such as inspecting incoming graph changes.A worked comparison on the same change and a choice justified by the review task.
54. Statistics and LoggingLog what each import accepts, rejects and leaves unresolved. Reconcile the totals against the input register.A run log whose counts reconcile and whose rejected rows can be located.
55. ChartingChart source coverage across assets or commissioning stages to help focus the meeting.A chart with counts and denominators and a route from a sparse category to its records.
56. Graph Visualization and ExtractionExtract the neighbourhood around one suspect display interface. Follow it through a test, a lesson and its evidence.A small diagram whose displayed edges can each be traced to a source assertion.
57. Publishing Interactive NotebooksPublish a readable version of the worked enquiry. Include the input version, exact question and source references.A reader can reproduce the listed lesson IDs from the published materials.
58. Setting Up a Remote Instance and Web Page ServerStage a read-only web page for the invented station fixture and its worked results.A second reader can open the page and identify exactly which fixture version it shows.
59. Adding a SPARQL Endpoint - Part IGive the fixture a SPARQL endpoint and register one question the handover team actually needs.A documented query returning the expected lesson identifiers on a known version.
60. Adding a SPARQL Endpoint - Part IIExercise the endpoint with matching, empty and ambiguous searches. Compare its answers with the local graph.Three result comparisons with differences tied to graph version or query behaviour.

Back to course contents

Part VI · 61–65Explore language and network structure

Original instalmentTry at MerebridgeEvidence to inspect
61. NLP, Machine Learning and AnalysisChoose a bounded text task such as finding earlier reports that might matter to a display test. Define a simple comparison search.A question, candidate report set and an agreed way for reviewers to judge relevance.
62. Network and Graph AnalysisBuild a network of lessons, interfaces and evidence. Ask whether highly connected items add a new issue to the agenda.A ranked list with source checks for a busy interface and a less-connected but consequential one.
63. Staging Data Sci Resources and PreprocessingPrepare the earlier notes for analysis. Keep document IDs and separate near-identical reports from distinct observations.A preprocessing log and an example showing how repeated text affects the candidate set.
64. Embeddings, Summarization and Entity RecognitionTry entity recognition or embeddings to retrieve notes written in a different team’s vocabulary. Compare the suggestions with keyword search.One newly surfaced relevant passage and one false match, each checked in its original note.
65. scikit-learn Basics and Initial EncodingEncode asset types, aliases and lesson text as model inputs. Inspect whether two similarly worded lessons remain distinguishable.An input-to-feature trace for the two lessons and an account of any distinction lost in encoding.

Back to course contents

Sources and scope

Bergman published 65 numbered instalments. The wrap-up section of his index links to an unnumbered suspension notice dated 3 August 2021. The final published lesson prepares features for machine learning. A station team that later tests a model against reviewers’ judgements would be extending the course. Author’s course index · Suspension notice

The course title, lesson sequence and technical topics come from Michael K. Bergman, Cognonto Corporation and KBpedia. The Merebridge tasks and evidence checks were written for this foray. Cognonto distributes the repository content under Creative Commons Attribution 4.0. Bergman identifies the companion cowpoke modules as the reference implementation for the extract-and-rebuild cycle. KBpedia · CWPK notebooks · Repository licence · Bergman on the round trip · cowpoke