File size: 2,400 Bytes
602b6ba | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | ---
license: mit
library_name: other
pipeline_tag: text-classification
tags:
- text-classification
- intent-detection
- router
- multilingual
- cpu
language:
- pt
- en
---
# Murph
Murph is the small request classifier built into [openTARS](https://project-opentars.github.io/OpenTARS/). For each request it decides the **kind of task**, so the app can pick the right model and tools before any language model runs.
It is not a language model. It is a softmax logistic regression over word pieces (2 to 5 letters), words and word pairs, with TF-IDF weights. It runs in plain Python on the CPU in about 0.2 ms per request, uses no GPU, and the whole model is one JSON file of about 4 MB.
## Classes
| Class | Meaning |
|---|---|
| `visao` | needs to look at the screen ("what is on this screen?") |
| `codigo` | writing or fixing code |
| `tecnico` | technical or system questions |
| `acao` | do something on the computer (open a program, create a folder) |
| `busca` | search the web |
| `simples` | greetings and simple chat |
| `geral` | everything else |
## Files
- `murph.json`: the trained model (SHA-256 `f1752425196a67c4baa28de5f6564a8dbccb6d41d12f44a0d0459a888c078f45`).
- `tars_murph.py`: the loader and classifier. It uses only the Python standard library.
## Use
```python
import tars_murph
murph = tars_murph.Murph.carregar("murph.json")
tarefa, confianca = murph.classificar("abre a calculadora")
print(tarefa, round(confianca, 2)) # acao 0.98
```
The model also stores a confidence threshold and a coverage minimum, so the app can fall back to another method when the request is unlike anything it saw in training.
## Training and results
- Trained on 3,034 request phrases in five languages: examples from the openTARS project plus phrases written by a larger model. Phrases similar to the evaluation phrases were removed from training.
- Cross-validation accuracy stored in the file: 88.9%.
- openTARS evaluation sets, measured on 18 October 2026: 170 of 175 across languages and 85 of 86 on the check set. The evaluation phrases were seen during development, so treat these as a sanity check, not as a benchmark.
## Limits
- Five languages only, and short requests work best.
- It picks one class per request. A request that mixes two tasks gets the more likely one.
- The class names are Portuguese because they come from the app code.
License: MIT.
|