Vocabulary refactoring is a proposed language-engineering practice for reorganising definitions, expressions and knowledge structures while preserving the meanings and behaviours that must remain stable for a specified task. A learning system might replace several duplicated explanations with a shared concept record, simplify an overly complicated instruction or separate two meanings that were accidentally stored under the same label. Each change can improve maintainability and comprehension, but it can also break a downstream interpretation if the original relationships, conditions or historical versions are not preserved. The crucial distinction is between improving a representation and intentionally changing the meaning that it governs.
Vocabulary Coding and Language Engineering draws a useful analogy from software refactoring, where internal structure can be improved while preserving specified externally observable behaviour. In language systems, preservation is always relative to an identified meaning, audience, task and context; natural language is not deterministic software. This advanced companion proposes a practical method for establishing invariants, inspecting dependencies, testing revised expressions and migrating incompatible definitions through an explicit versioned process. Children can use the principles to improve a sentence without changing its intended thought, while educators, organisations and human–AI systems can apply them to shared knowledge resources. This is an educational and engineering proposal, not a validated universal procedure for changing language or an authority to redefine another community’s words.
- Word zoom: distinguish a changed label from a changed concept.
- Thought zoom: simplify an expression while preserving its relationships, scope and evidence.
- Learning zoom: improve explanation and transfer without teaching an unintended new meaning.
- Engineering zoom: separate meaning-preserving refactoring from intentional semantic migration.
- Human–AI zoom: retain explicit versions and acceptance tests when rewriting or reorganising knowledge.
- Civilisation zoom: preserve the interpretability of inherited records while allowing knowledge systems to evolve.
- Practical action: refactor a small fictional glossary, test its existing uses and document any incompatible changes.
Reading route
- 1. What vocabulary refactoring is meant to preserve
- 2. Worked laboratory: split an ambiguous label
- 3. Classify the proposed change before implementing it
- 4. Extract and reuse concepts without losing their context
- 5. Inspect dependencies and run the existing tests
- 6. Semantic migration when compatibility cannot be preserved
- 7. Reversibility and honest recovery
- 8. Learning to refactor a sentence with the Fencing Method
- 9. A four-week refactoring laboratory and the next prototype
1. What vocabulary refactoring is meant to preserve
The preceding semantic benchmark companion introduced reusable reference cases that distinguish acceptable paraphrases from consequential changes. A refactoring process uses such cases to assess whether a revised knowledge structure still supports the intended tasks.
Consider the sentence The library permits members to borrow one available book until Friday. Reordering the words or expressing the permission more clearly can preserve the rule in its stated context. Removing available or changing members to anyone alters the conditions. Those changes may be appropriate if the rule is deliberately revised through the proper process, but they should not be represented as merely editorial improvements.
A useful vocabulary refactoring identifies the behaviour to preserve. For an instructional sentence, the expected behaviour may be that a reader can reconstruct the intended rule. For a concept library, it may be that users can retrieve the same specified definition and supported relationships. For an institutional report, it may be that records continue to be classified using the same applicable criterion.
No test can establish that every possible implication remains unchanged. Specify which properties were checked, the intended audience and the scope of the claim of compatibility.
2. Worked laboratory: split an ambiguous label
Imagine a fictional school project registry using a single field labelled completed. Earlier entries use it to indicate receipt of a submission, whereas newer entries use it to indicate acceptance following review. These meanings must not be silently merged. A useful refactoring first identifies and preserves the original versions and then provides clearer names for the different states.
The following examples are fictional. The distinction is between recovering documented states and inventing states that the old records cannot establish.
| Original record | Available evidence | Refactored interpretation |
|---|---|---|
| completed = true (v1) | Submission received | Submitted = yes; accepted = unknown |
| completed = false (v1) | No submission under v1 criterion | Submitted = no; acceptance not established |
| completed = true (v2) | Accepted after review | Accepted = yes; associated submission inferred only if the documented rule requires it |
| completed = true (version unknown) | No applicable criterion established | Preserve original record; mark interpretation unresolved |
Separating submitted from accepted improves the ability to ask precise questions, but it does not magically recover missing historical information. A receiving system must not assign false values to unknown fields merely to complete a migration.
The versioned meaning registry companion explains why an earlier definition should remain addressable. The Age 11 semantic-change chapter distinguishes a revision to a criterion from a change in the underlying world. Both distinctions matter when reorganising knowledge.
3. Classify the proposed change before implementing it
A change in presentation is not necessarily a change in meaning. A correction to a false assertion is not a meaning-preserving refactoring of that assertion. Introducing a newly justified definition is an intentional change that may require migration. Classifying the change helps select the appropriate tests and documentation.
| Proposed change | Illustrative case | Treatment |
|---|---|---|
| Presentation | Reorder words in a faithful paraphrase | Test relevant invariants |
| Structural extraction | Reference one documented definition from several lessons | Preserve context and test each lesson |
| Concept separation | Distinguish submitted from accepted | Retain versioned mappings and unknown states |
| Factual correction | Replace an incorrect duration | Mark the correction and examine dependencies |
| Policy revision | Change a borrowing limit | Record new authority, criterion and effective period |
Do not treat these categories as mutually exclusive in every project. A structural reorganisation may expose a factual error, and a new naming scheme may require a compatibility mapping. Record the separate changes and why each was made.
The compositional meaning contracts companion helps examine whether a revised component continues to meet the input requirements of resources that rely on it. A change can be compatible with one use but incompatible with another.
4. Extract and reuse concepts without losing their context
A learner may encounter several explanations of area in different worksheets. Some may describe rectangular area, others may discuss surface area or an application involving an irregular figure. A shared concept record can reduce duplication, but the record must distinguish the general concept from the procedure appropriate to a particular shape.
Instead of replacing every explanation with the same sentence, create a core definition and retain application-specific conditions, examples and units. Link each lesson to the relevant concept version and record which additional relationships the lesson requires.
The Age 14 knowledge architecture chapter introduces concept identifiers and labelled relationships. Reuse those structures where they improve the resource. Avoid creating abstractions whose additional complexity exceeds their educational value.
A good refactoring may result in fewer duplicated definitions but more explicit contextual records. The number of words removed is not a reliable measure of success. The relevant question is whether the resulting knowledge is easier to maintain and still supports the intended applications.
5. Inspect dependencies and run the existing tests
Before replacing a concept record, identify the resources that reference it. The semantic dependency graph companion distinguishes directly and indirectly affected resources. A shared definition may be used by several explanations, reports or AI-assisted workflows.
Select tests that reflect the important uses. Include a familiar example, a boundary case, a previously observed error and a case with missing information. A compatible restructuring should preserve the expected interpretations for those cases; an intentional change should produce documented differences.
The semantic regression testing companion supplies a method for rerunning checks after a modification. The semantic benchmark companion adds explicit reference cases and held-out evaluation. Do not revise the expected answer merely because the new version fails a test.
If a discrepancy appears, determine whether the proposed change is unsuitable, the earlier interpretation was incorrect or the test no longer represents the intended use. Record the reason and obtain appropriate review before changing the expectation.
6. Semantic migration when compatibility cannot be preserved
Sometimes a better definition deliberately changes the meaning that a system uses. The appropriate response is migration, not a claim that nothing changed. Introduce the revised definition with an identifiable version, scope and authorised effective period. Retain the original record so historical data remain interpretable.
Document how earlier records map to the new structure. Some mappings may be exact for the stated task. Others may be partial, conditional or unresolved. A historical record lacking the necessary information cannot be made compatible by guessing its new value.
The federated meaning registry companion explains why independently maintained concept systems may retain different valid definitions. A migration in one registry does not grant authority to redefine another community’s concepts. Update crosswalks where justified rather than force every participant to adopt the new meaning.
For real systems, identify how users will be informed, how affected interpretations can be corrected and which prior versions remain relevant. Any operational migration requires appropriate authorisation and safeguards. A classroom exercise can model the process entirely with invented records.
7. Reversibility and honest recovery
Where practical, retain the original resources and a record of the transformation so a faulty migration can be investigated or reversed. A reversible representation does not guarantee that the downstream effects of an external action can be undone. Distinguish restoring a previous definition from reversing decisions already made using the changed one.
If a revised representation loses essential context, the semantic fault isolation companion helps locate the earliest observed divergence. The semantic resilience companion explains why a system should retain useful supported functions while marking affected operations as unresolved.
Compare the restored resource with its original reference cases. Verify which version is active and which dependent outputs require correction. Do not claim that the entire system has recovered merely because the original wording has been restored.
The semantic observability companion suggests preserving appropriate evidence about the transformations and checks actually performed. Collect only information needed for a legitimate purpose, not private thoughts or unnecessary personal data.
8. Learning to refactor a sentence with the Fencing Method
The Fencing Method offers a practical teaching route: begin with a meaningful sentence, add a justified detail and examine how the resulting expression differs. The learner can then remove unnecessary repetition or replace a difficult phrase with a clearer equivalent.
Try the fictional expression The pupils who had permission were allowed to borrow one book. A shorter version might be The authorised pupils could borrow one book. Discuss whether authorised refers to the same group and whether could communicates permission rather than ability in the stated context.
The eduKate L0–L15 vocabulary ladder proposes different learning operations from identifying and explaining to transfer, formalisation and critique. Choose the activity that supports the learner’s current understanding. Do not require a particular level by birthday or treat one failed paraphrase as a general deficiency.
Accept a different expression when it preserves the relevant meaning. If a change is intended to introduce a new idea, ask the learner to identify it as a revision rather than an equivalent paraphrase.
9. A four-week refactoring laboratory and the next prototype
In week one, select five fictional concept records and identify duplicated explanations, conflicting labels and important uses. In week two, propose a limited restructuring and identify the properties that must remain stable. In week three, run reference cases and obtain an independent interpretation of the revised resources.
In week four, introduce an intentional incompatible revision and document its mapping, effective context and unresolved historical fields. Test unfamiliar examples. The empirical pilots companion explains why a proposed improvement needs evidence of its benefits and costs, rather than an assumption that a more elaborate structure is superior.
At the personal zoom, refactoring helps a learner express a thought more clearly. At the educational zoom, it supports reusable explanations. At the organisational and civilisation zooms, it offers one approach to maintaining shared knowledge without concealing the history of its meanings.
The next companion converts several of these proposed mechanisms into a small executable demonstration: a minimum viable meaning engine with a defined input format, explicit invariants and a limited set of synthetic tests. Its purpose is to show what a narrow implementation can actually check, and where natural-language interpretation and evidence review remain outside its capability.