How seemanteng/ling-mapper works
Ling Mapper turns an essay question and response into a validated, clause-level argument graph, then displays it for review. The primary path is the local web interface (or batch extraction) through two-stage Claude extraction and contract validation to graph output and the browser viewer. Supporting product branches cover record preparation and scoring, plus explicitly exploratory source-passage graphs, alignment, and findings. The README documents these capabilities; source excerpts are partial, so uncertain exploratory wiring is left unconnected.
Main entry points: student_graph.py Two-stage extraction · graph_schema.py Graph contract · web.py Local web interface · persuade.py PERSUADE importer
Components 18
Student extraction
- Local web interface
src/argument_graph/web.py - Two-stage extraction
src/argument_graph/student_graph.py - Graph contract
src/argument_graph/graph_schema.py
Records and scoring
- Record schemas
src/argument_graph/schemas.py - PERSUADE importer
src/argument_graph/loaders/persuade.py - Span recovery
src/argument_graph/spans.py - Record preparation
src/argument_graph/prepare_data.py - GUM importer
src/argument_graph/loaders/gum.py - Graph evaluation
src/argument_graph/evaluate.py
Exploratory analysis
- Source retrieval
src/argument_graph/fetch_sources.py - Source graph
src/argument_graph/source_graph.py - Student-source alignment
src/argument_graph/align.py - Alignment findings
src/argument_graph/findings.py - Source graph viewer
src/argument_graph/render_source_html.py - Findings viewer
src/argument_graph/render_findings_html.py
Graph review
- Graph viewer
src/argument_graph/render_graph_html.py
Other components
- Essay submitter
- Anthropic Claude
Connections 16
- Essay submitter → Local web interface: submits essay
README.md - Local web interface → Two-stage extraction: runs extraction
src/argument_graph/web.py - Two-stage extraction → Anthropic Claude: requests annotations
README.md - Two-stage extraction → Graph contract: validates graph
src/argument_graph/student_graph.py - Local web interface → Graph viewer: renders result
src/argument_graph/web.py - PERSUADE importer → Span recovery: recovers spans
src/argument_graph/loaders/persuade.py - PERSUADE importer → Record schemas: creates records
src/argument_graph/loaders/persuade.py - Record preparation → PERSUADE importer: imports records
src/argument_graph/prepare_data.py - GUM importer → Record schemas: creates records
src/argument_graph/loaders/gum.py - GUM importer → Graph contract: adapts relation schema
src/argument_graph/loaders/gum.py - Graph evaluation → Graph contract: derives edge scores
src/argument_graph/evaluate.py - Graph viewer → Graph contract: shows violations
src/argument_graph/render_graph_html.py - Student-source alignment → Two-stage extraction: aligns student graphs
src/argument_graph/align.py - Alignment findings → Student-source alignment: analyzes alignments
src/argument_graph/findings.py - Source graph viewer → Source graph: renders source graphs
src/argument_graph/render_source_html.py - Findings viewer → Alignment findings: renders findings