Skip to content

Integrate Proteus alignment pipeline into align.py; document in README#22

Merged
Sulstice merged 1 commit into
mainfrom
claude/schema-registry-meta-model-2upt56
Jul 24, 2026
Merged

Integrate Proteus alignment pipeline into align.py; document in README#22
Sulstice merged 1 commit into
mainfrom
claude/schema-registry-meta-model-2upt56

Conversation

@Sulstice

Copy link
Copy Markdown
Collaborator

Rewrites neuro_ghost/align.py to implement the full six-stage Proteus alignment pipeline inline (no external proteus_align import):

  • Stage 0: load_classes() builds MatchingProfiles from LadybugDB, now including units from HAS_PROPERTY edges
  • Stage 1: pairs_across_sources() candidate blocking + hard unit veto (UCUM→QUDT dimensional veto — the only precision filter at stage 1)
  • Stage 2: compute_signals() produces a frozen SignalVector per pair; absent signals are None (MISSING), never zero-imputed
  • Stage 3: calibrate() weights present signals (W_NAME=0.45, W_JACCARD=0.35, W_ALIAS=0.20), blends definition cosine at 25%, adds UNIT_BONUS=0.05 for compatible dimensions
  • Stage 4: assign_predicate() two-pathway: anchored (IRI) can reach exactMatch/broadMatch/narrowMatch; statistical caps at closeMatch
  • Stage 5: repair_structural() demotes duplicate exactMatch to closeMatch
  • Stage 6: write_alignment() writes ALIGNED_TO edges with distance, skos_relation, method, and per-signal subscores

Also inlines _lexical.py (tokenization, Jaccard, string_sim) and units.py (UCUM→QUDT dimension table). Definition embeddings (M3) are implemented via sentence-transformers all-MiniLM-L6-v2, cached in data/embeddings.parquet.

README: adds alignment pipeline table, fixes stale distance formula.

Claude-Session: https://claude.ai/code/session_01EXeTeJsXisxTRXay6EoBSQ

Rewrites neuro_ghost/align.py to implement the full six-stage Proteus
alignment pipeline inline (no external proteus_align import):

- Stage 0: load_classes() builds MatchingProfiles from LadybugDB, now
  including units from HAS_PROPERTY edges
- Stage 1: pairs_across_sources() candidate blocking + hard unit veto
  (UCUM→QUDT dimensional veto — the only precision filter at stage 1)
- Stage 2: compute_signals() produces a frozen SignalVector per pair;
  absent signals are None (MISSING), never zero-imputed
- Stage 3: calibrate() weights present signals (W_NAME=0.45,
  W_JACCARD=0.35, W_ALIAS=0.20), blends definition cosine at 25%,
  adds UNIT_BONUS=0.05 for compatible dimensions
- Stage 4: assign_predicate() two-pathway: anchored (IRI) can reach
  exactMatch/broadMatch/narrowMatch; statistical caps at closeMatch
- Stage 5: repair_structural() demotes duplicate exactMatch to closeMatch
- Stage 6: write_alignment() writes ALIGNED_TO edges with distance,
  skos_relation, method, and per-signal subscores

Also inlines _lexical.py (tokenization, Jaccard, string_sim) and
units.py (UCUM→QUDT dimension table). Definition embeddings (M3) are
implemented via sentence-transformers all-MiniLM-L6-v2, cached in
data/embeddings.parquet.

README: adds alignment pipeline table, fixes stale distance formula.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EXeTeJsXisxTRXay6EoBSQ
@Sulstice
Sulstice merged commit fd537e3 into main Jul 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants