# matra > NLP library: UDPipe structured parse, base text metrics, summarization, keyphrase extraction. Rust core with Python bindings. ## Introduction - [Home](https://mox-labs.github.io/matra/home.html): matra parses English text into sections, paragraphs, sentences and words, and returns measures, summaries and keyphrases over them, from Rust, Python or the command line. ## Tutorials - [Your first analysis](https://mox-labs.github.io/matra/tutorials/first-analysis.html): You will run matra on two short paragraphs of meeting minutes, then find four things in what it returns: the document's structure, the grammar it read off each sentence, the measures of each paragraph, and the measures of the whole document. ## How-to guides - [Install matra](https://mox-labs.github.io/matra/tutorials/installation.html): Install matra as a Rust library, a command-line binary or a Python package, then check that it works. - [Migrate from 0.2 to 0.3](https://mox-labs.github.io/matra/guides/migrate-to-0-3.html): 0.3.0 changes Rust, Python, the command line, the JSON and the config file at once. - [How-to guides](https://mox-labs.github.io/matra/examples/index.html): Each guide does one task on one real text. - [Parse a sentence into its dependency tree](https://mox-labs.github.io/matra/examples/parse-a-sentence.html): The first sentence of Pride and Prejudice, parsed: every word with its lemma, its part of speech, the word it depends on, and the relation between them. - [Find negations and modals](https://mox-labs.github.io/matra/examples/negations-and-modals.html): Which sentences of a legal text are negated, and which carry a modal verb, read off each sentence's dependency tree. - [Compare readability across paragraphs](https://mox-labs.github.io/matra/examples/readability-by-paragraph.html): The three paragraph measures of The Federalist No. 10, to see where the essay is harder going and where it eases. - [Summarize a long document](https://mox-labs.github.io/matra/examples/summarize.html): The three sentences TextRank ranks highest in the opening of Darwin's chapter on the struggle for existence, 2,214 words. - [Extract a document's keyphrases](https://mox-labs.github.io/matra/examples/keyphrases.html): The ten phrases RAKE ranks highest in the same Darwin text as the summary example. - [Read a Markdown document's structure](https://mox-labs.github.io/matra/examples/markdown-structure.html): A short Markdown document with two headings and a quote, read into sections and paragraphs. - [Cluster sentences by meaning](https://mox-labs.github.io/matra/guides/semantic-clusters.html): Group the sentences of a document that say the same thing in different words, for example to audit LLM output for restatement, which lexical overlap cannot see. - [Hand matra to an agent](https://mox-labs.github.io/matra/guides/agent.html): Give an agent matra's own instructions, printed by the version it will run, rather than pointing it at these pages. - [Install the model behind a TLS-intercepting proxy](https://mox-labs.github.io/matra/guides/tls-proxy.html): Place the parsing model by hand when a proxy that re-signs TLS stops matra from downloading it. ## Explanation - [Introduction](https://mox-labs.github.io/matra/introduction.html): matra reports the structure of text and measurements over it. - [Concepts](https://mox-labs.github.io/matra/explanation/concepts.html): Analysis returns one nested value. Each level owns the level below it and carries its own data. - [Situation model](https://mox-labs.github.io/matra/explanation/situation-model.html): matra reports the structure of text and measurements over it. - [Programming model](https://mox-labs.github.io/matra/explanation/programming-model.html): `Input` is one document. `Engine` is what happens to it. - [One core, three install routes](https://mox-labs.github.io/matra/explanation/install-routes.html): matra is one Rust core published three ways: a library on crates.io, a command-line binary built from the same crate, and a Python package on PyPI. The routes differ in what they compile and what they print about themselves, and not in what an analysis returns. - [What the clustering threshold does](https://mox-labs.github.io/matra/explanation/semantic-clusters.html): matra can group the sentences of a document that say the same thing in different words. - [Pragmatics](https://mox-labs.github.io/matra/explanation/pragmatics.html): Which call to reach for, and how to read what it returns: the choices behind the summarizers, the keyphrase extractors, the document measures, the clustering threshold and the models, and why each answer is what it is. - [How matra runs](https://mox-labs.github.io/matra/architecture/design.html): `engine.analyze(Input::file("essay.md"))` yields a `Document` or an `Error`. - [How matra is maintained](https://mox-labs.github.io/matra/explanation/how-matra-is-maintained.html): matra is maintained by its owner and by Claude, Anthropic's AI, working through a set of agents, skills and checks that live in the repository beside the code. ## Reference - [What matra gives you](https://mox-labs.github.io/matra/capabilities.html): Every value the pipeline returns, by tier. - [Domain model](https://mox-labs.github.io/matra/reference/domain-types.html): `matra::domain` holds every type the library hands back. - [Platforms and models](https://mox-labs.github.io/matra/reference/platforms.html): What each of matra's install routes needs and installs, and the models matra downloads. - [Semantic clusters](https://mox-labs.github.io/matra/reference/semantic-clusters.html): The value semantic clustering returns, the model it embeds with, and its bounds. - [Rust](https://mox-labs.github.io/matra/guides/rust.html): You already have `matra` in your `Cargo.toml`. - [Python](https://mox-labs.github.io/matra/guides/python.html): You installed matra with `uv add 'matra>=0.3'` or `pip install 'matra>=0.3'`. - [CLI](https://mox-labs.github.io/matra/guides/cli.html): `matra` reads a file, a directory or stdin and writes to stdout. - [Methodology](https://mox-labs.github.io/matra/reference/methodology.html): What each number matra reports is computed from, how to cite the work it comes from, and what it does not license you to conclude. - [Errors](https://mox-labs.github.io/matra/reference/errors.html): Every fallible function in matra returns `domain::Result`, which is `std::result::Result`. - [Boundary rules](https://mox-labs.github.io/matra/reference/boundary-rules.html): Eight rules hold matra's hexagonal architecture in place. ## What is planned - [Roadmap](https://mox-labs.github.io/matra/roadmap.html): What matra does not do yet, why, and the condition that would change that. ## Blueprints - [Blueprints: the process and the index](https://mox-labs.github.io/matra/blueprints/index.html): matra's design records, and the process that says which record a change takes. - [EPR-0001: The pipeline and its ports](https://mox-labs.github.io/matra/blueprints/proposals/0001-pipeline-and-ports.html): Status: proposed. matra is one crate whose surface is one pipeline. - [EPR-0002: The data model](https://mox-labs.github.io/matra/blueprints/proposals/0002-data-model.html): Status: proposed. Everything matra hands back is a type in `src/domain.rs`, which depends on `serde`, `thiserror` and `std` and nothing else. - [EPR-0003: Distribution and provisioning](https://mox-labs.github.io/matra/blueprints/proposals/0003-distribution-and-provisioning.html): Status: proposed. matra ships as one crate on crates.io and one package on PyPI, under one name, one version and one attribution. - [EPR-0004: The command line, configuration and the agent skill](https://mox-labs.github.io/matra/blueprints/proposals/0004-command-line-and-configuration.html): Status: proposed. There is one `matra` command line, written in Rust as the library module `matra::cli`, whose whole surface is `cli::run(args, out, err) -> u8`. - [EPR-0005: Embeddings and semantic clusters](https://mox-labs.github.io/matra/blueprints/proposals/0005-embeddings-and-semantic-clusters.html): Status: proposed. matra can group a document's sentences that say the same thing in different words. - [EPR-0006: The 0.3.0 surface](https://mox-labs.github.io/matra/blueprints/proposals/0006-the-0-3-0-surface.html): Status: implemented. 0.3.0 settles matra's public surface once, as one design, before a TypeScript surface copies it. - [EPR-0007: TypeScript and WebAssembly](https://mox-labs.github.io/matra/blueprints/proposals/0007-typescript-and-webassembly.html): Status: proposed. matra gains a TypeScript package for the browser and Node.js. ## Lab - [Lab](https://mox-labs.github.io/matra/lab/index.html): The Lab is where matra's evals and experiments will live: measurements of how well matra does what it claims, and trials of what it might do next, each with the data and the method that produced it.