Text Annotator
A versatile utility toolkit for recording, categorizing, and managing annotation data from the command line. Each command logs timestamped entries to its own dedicated log file, with built-in statistics, search, export, and health-check capabilities.
Why Text Annotator?
- Works entirely offline — your data stays on your machine
- Each command type maintains its own log file for clean separation
- Built-in multi-format export (JSON, CSV, plain text)
- Full activity history with timestamped audit trail
- Search across all log files instantly
- Summary statistics with entry counts and disk usage
Commands
Core Operations
| Command |
Description |
text-annotator run <input> |
Record a run entry (no args: show recent entries) |
text-annotator check <input> |
Record a check entry (no args: show recent entries) |
text-annotator convert <input> |
Record a convert entry (no args: show recent entries) |
text-annotator analyze <input> |
Record an analyze entry (no args: show recent entries) |
text-annotator generate <input> |
Record a generate entry (no args: show recent entries) |
text-annotator preview <input> |
Record a preview entry (no args: show recent entries) |
text-annotator batch <input> |
Record a batch entry (no args: show recent entries) |
text-annotator compare <input> |
Record a compare entry (no args: show recent entries) |
text-annotator export <input> |
Record an export entry (no args: show recent entries) |
text-annotator config <input> |
Record a config entry (no args: show recent entries) |
text-annotator status <input> |
Record a status entry (no args: show recent entries) |
text-annotator report <input> |
Record a report entry (no args: show recent entries) |
Utility Commands
| Command |
Description |
text-annotator stats |
Show summary statistics (entry counts per type, total, disk usage) |
text-annotator export <fmt> |
Export all data in json, csv, or txt format |
text-annotator search <term> |
Search across all log files (case-insensitive) |
text-annotator recent |
Show the 20 most recent activity log entries |
text-annotator status |
Health check (version, entries, disk, last activity) |
text-annotator help |
Display all available commands |
text-annotator version |
Print version string |
Each core command works in two modes:
- With arguments: Saves a timestamped entry to
<command>.log and logs to history.log
- Without arguments: Displays the 20 most recent entries from that command's log
Data Storage
All data is stored locally in ~/.local/share/text-annotator/ (override with TEXT_ANNOTATOR_DIR). The directory contains:
run.log, check.log, convert.log, etc. — One log file per command type, storing YYYY-MM-DD HH:MM|input entries
history.log — Unified activity log with timestamped records of every command executed
export.json / export.csv / export.txt — Generated export files
Requirements
- Bash 4.0+ with
set -euo pipefail strict mode
- Standard Unix utilities:
grep, cat, tail, wc, du, date, sed
- No external dependencies or network access required
When to Use
- Annotating text samples — Use
text-annotator run "sample: positive sentiment" to log annotation decisions with timestamps
- Batch processing annotations — Record bulk operations with
text-annotator batch "processed 500 samples from dataset-v3"
- Comparing annotation results — Track comparison notes with
text-annotator compare "model-A vs model-B: 94% agreement"
- Generating annotation reports — Use
text-annotator report to log report milestones, then text-annotator stats for summary data
- Exporting labeled data — Run
text-annotator export json to export all logged entries across all command types in structured JSON
Examples
# Record annotation activities
text-annotator run "labeled 50 sentences for NER"
text-annotator analyze "sentiment distribution: 60% pos, 25% neg, 15% neutral"
text-annotator check "inter-annotator agreement: 0.87 kappa"
# Batch processing log
text-annotator batch "imported dataset-v2: 10,000 samples"
text-annotator convert "exported NER tags to CoNLL format"
# Search and review
text-annotator search "sentiment"
text-annotator recent
# Export all data
text-annotator export json
text-annotator export csv
# View statistics and health
text-annotator stats
text-annotator status
Configuration
Set the TEXT_ANNOTATOR_DIR environment variable to change the data directory:
export TEXT_ANNOTATOR_DIR="$HOME/my-annotations"
Default location: ~/.local/share/text-annotator/
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
1---2name: doccano3description: Open source annotation tool for machine learning practitioners. text-annotator, python, annotation-tool, data-labeling, dataset, datasets.4---5
6# Text Annotator
7
8A versatile utility toolkit for recording, categorizing, and managing annotation data from the command line. Each command logs timestamped entries to its own dedicated log file, with built-in statistics, search, export, and health-check capabilities.
9
10## Why Text Annotator?
11
12- Works entirely offline — your data stays on your machine
13- Each command type maintains its own log file for clean separation
14- Built-in multi-format export (JSON, CSV, plain text)
15- Full activity history with timestamped audit trail
16- Search across all log files instantly
17- Summary statistics with entry counts and disk usage
18
19## Commands
20
21### Core Operations
22
23| Command | Description |
24|---------|-------------|
25| `text-annotator run <input>` | Record a run entry (no args: show recent entries) |
26| `text-annotator check <input>` | Record a check entry (no args: show recent entries) |
27| `text-annotator convert <input>` | Record a convert entry (no args: show recent entries) |
28| `text-annotator analyze <input>` | Record an analyze entry (no args: show recent entries) |
29| `text-annotator generate <input>` | Record a generate entry (no args: show recent entries) |
30| `text-annotator preview <input>` | Record a preview entry (no args: show recent entries) |
31| `text-annotator batch <input>` | Record a batch entry (no args: show recent entries) |
32| `text-annotator compare <input>` | Record a compare entry (no args: show recent entries) |
33| `text-annotator export <input>` | Record an export entry (no args: show recent entries) |
34| `text-annotator config <input>` | Record a config entry (no args: show recent entries) |
35| `text-annotator status <input>` | Record a status entry (no args: show recent entries) |
36| `text-annotator report <input>` | Record a report entry (no args: show recent entries) |
37
38### Utility Commands
39
40| Command | Description |
41|---------|-------------|
42| `text-annotator stats` | Show summary statistics (entry counts per type, total, disk usage) |
43| `text-annotator export <fmt>` | Export all data in json, csv, or txt format |
44| `text-annotator search <term>` | Search across all log files (case-insensitive) |
45| `text-annotator recent` | Show the 20 most recent activity log entries |
46| `text-annotator status` | Health check (version, entries, disk, last activity) |
47| `text-annotator help` | Display all available commands |
48| `text-annotator version` | Print version string |
49
50Each core command works in two modes:
51- **With arguments**: Saves a timestamped entry to `<command>.log` and logs to `history.log`
52- **Without arguments**: Displays the 20 most recent entries from that command's log
53
54## Data Storage
55
56All data is stored locally in `~/.local/share/text-annotator/` (override with `TEXT_ANNOTATOR_DIR`). The directory contains:
57
58- **`run.log`**, **`check.log`**, **`convert.log`**, etc. — One log file per command type, storing `YYYY-MM-DD HH:MM|input` entries
59- **`history.log`** — Unified activity log with timestamped records of every command executed
60- **`export.json`** / **`export.csv`** / **`export.txt`** — Generated export files
61
62## Requirements
63
64- **Bash** 4.0+ with `set -euo pipefail` strict mode
65- Standard Unix utilities: `grep`, `cat`, `tail`, `wc`, `du`, `date`, `sed`
66- No external dependencies or network access required
67
68## When to Use
69
701. **Annotating text samples** — Use `text-annotator run "sample: positive sentiment"` to log annotation decisions with timestamps
712. **Batch processing annotations** — Record bulk operations with `text-annotator batch "processed 500 samples from dataset-v3"`
723. **Comparing annotation results** — Track comparison notes with `text-annotator compare "model-A vs model-B: 94% agreement"`
734. **Generating annotation reports** — Use `text-annotator report` to log report milestones, then `text-annotator stats` for summary data
745. **Exporting labeled data** — Run `text-annotator export json` to export all logged entries across all command types in structured JSON
75
76## Examples
77
78```bash
79# Record annotation activities
80text-annotator run "labeled 50 sentences for NER"
81text-annotator analyze "sentiment distribution: 60% pos, 25% neg, 15% neutral"
82text-annotator check "inter-annotator agreement: 0.87 kappa"
83
84# Batch processing log
85text-annotator batch "imported dataset-v2: 10,000 samples"
86text-annotator convert "exported NER tags to CoNLL format"
87
88# Search and review
89text-annotator search "sentiment"
90text-annotator recent
91
92# Export all data
93text-annotator export json
94text-annotator export csv
95
96# View statistics and health
97text-annotator stats
98text-annotator status
99```
100
101## Configuration
102
103Set the `TEXT_ANNOTATOR_DIR` environment variable to change the data directory:
104
105```bash
106export TEXT_ANNOTATOR_DIR="$HOME/my-annotations"
107```
108
109Default location: `~/.local/share/text-annotator/`
110
111---
112Powered by BytesAgain | bytesagain.com | hello@bytesagain.com