doc: document current knowledge graph data extraction model #2

Merged
eliribble merged 2 commits from issue-1-knowledge-graph-doc into main 2026-07-22 01:47:01 +00:00
Member

Summary

This PR adds comprehensive design documentation for the Nidus-iOS Knowledge Graph — the on-device voice dictation extraction engine that structures field technician speech into typed observation records.

What's documented

  • Pipeline architecture — end-to-end data flow from SFSpeechRecognizer through NaturalLanguage tokenization to struct extraction and UI rendering
  • Natural Language Service — lexical class and lemma tagging using Apple's NaturalLanguage framework
  • Extraction engine — gram-based keyword dispatch, negation handling, numeric extraction, volume/dimension parsing, condition matching
  • Knowledge Graph data model — all 7 sub-graphs (Breeding, Source, Fieldseeker, AdultProduction, Driver, Facilitator, RootCause) with their fields, enums, and implication chains
  • AudioTag system — parallel keyword-based categorical tag matching (30+ habitats, 18 species, 34 products)
  • Report types and workflows — Inspection vs MosquitoSource reports, treatment recommendations, user tags
  • Transcript tag highlighting — multi-colored word-level annotation for live transcription display
  • Test coverage — 20+ unit tests with realistic field dictation input
  • Known limitations — gram brittleness, no session persistence, no multi-value support, volume assumptions
  • Comparison to backend — how the iOS knowledge graph relates to the nidus-sync backend parser (Issue #155)

Closes Issue #1 — documents the current data extraction model and provides context for understanding what Benjamin was requesting in nidus-sync Issue #155.

## Summary This PR adds comprehensive design documentation for the Nidus-iOS Knowledge Graph — the on-device voice dictation extraction engine that structures field technician speech into typed observation records. ### What's documented - **Pipeline architecture** — end-to-end data flow from SFSpeechRecognizer through NaturalLanguage tokenization to struct extraction and UI rendering - **Natural Language Service** — lexical class and lemma tagging using Apple's NaturalLanguage framework - **Extraction engine** — gram-based keyword dispatch, negation handling, numeric extraction, volume/dimension parsing, condition matching - **Knowledge Graph data model** — all 7 sub-graphs (Breeding, Source, Fieldseeker, AdultProduction, Driver, Facilitator, RootCause) with their fields, enums, and implication chains - **AudioTag system** — parallel keyword-based categorical tag matching (30+ habitats, 18 species, 34 products) - **Report types and workflows** — Inspection vs MosquitoSource reports, treatment recommendations, user tags - **Transcript tag highlighting** — multi-colored word-level annotation for live transcription display - **Test coverage** — 20+ unit tests with realistic field dictation input - **Known limitations** — gram brittleness, no session persistence, no multi-value support, volume assumptions - **Comparison to backend** — how the iOS knowledge graph relates to the nidus-sync backend parser (Issue #155) ### Related Closes Issue #1 — documents the current data extraction model and provides context for understanding what Benjamin was requesting in nidus-sync Issue #155.
Add comprehensive design documentation for the Nidus-iOS Knowledge Graph
system — the on-device voice dictation extraction engine that structures
field technician speech into typed observation records.

This covers the full pipeline from SFSpeechRecognizer capture through
NaturalLanguage tokenization, gram-based extraction, the KnowledgeGraph
struct hierarchy (7 sub-graphs: Breeding, Source, Fieldseeker, AdultProduction,
Driver, Facilitator, RootCause), the AudioTag keyword system, UI rendering,
test coverage, known limitations, and the relationship to the backend parser.

Issue: #1
Owner

Please drop the "11. Relationship to Backend Extraction (nidus-sync)" section entirely. That backend extraction is going to be dropped.

Please drop the "11. Relationship to Backend Extraction (nidus-sync)" section entirely. That backend extraction is going to be dropped.
Eli requested dropping the 'Relationship to Backend Extraction (nidus-sync)' section entirely, since that backend extraction is being dropped.
Author
Member

Done — section 11 dropped in commit 99f5068, pushed to the branch. The PR now ends at the AudioTag limitations note.

Done — section 11 dropped in commit 99f5068, pushed to the branch. The PR now ends at the AudioTag limitations note.
eliribble approved these changes 2026-07-22 01:46:56 +00:00
eliribble deleted branch issue-1-knowledge-graph-doc 2026-07-22 01:47:01 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Gleipnir/Nidus-iOS!2
No description provided.