File size: 2,900 Bytes
3c1e26c
 
5c47768
3c1e26c
5c47768
 
 
 
3c1e26c
 
5c47768
3c1e26c
5c47768
3c1e26c
46c948a
3c1e26c
5c47768
3c1e26c
5c47768
 
 
 
 
 
 
 
 
3c1e26c
5c47768
3c1e26c
5c47768
3c1e26c
5c47768
 
 
 
 
46c948a
5c47768
 
 
 
 
 
 
 
 
 
 
 
46c948a
5c47768
 
 
 
 
 
 
 
 
46c948a
5c47768
d783496
5c47768
 
46c948a
5c47768
 
46c948a
5c47768
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3c1e26c
5c47768
3c1e26c
5c47768
 
 
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
language:
- multilingual
tags:
- translation
- quality-estimation
- claude-haiku
license: mit
---

# natgillin/translations — Claude-Haiku-filtered bitext

Rows from `natgillin/translations-raw` that scored `> 0.8` on Claude Haiku 4.5 translation-quality evaluation. Globally deduplicated by xxh3-64 of `source\ntarget`.

## Schema

Each parquet file has 7 columns:

| column | type | description |
|---|---|---|
| `source` | string | source-language sentence |
| `target` | string | target-language sentence |
| `source_lang` | string | ISO-639-3 source language code |
| `target_lang` | string | ISO-639-3 target language code |
| `origin` | string | upstream OPUS corpus tag (e.g. `opus-nllb`) |
| `xxhash_intdigest` | uint64 | hash of the pair (see below) |
| `claude_haiku_score` | float32 | quality score in `[0.0, 1.0]` from Claude Haiku 4.5 |

The split is `claude_haiku_score > 0.8`: kept rows live in `natgillin/translations`, rejected rows in `natgillin/translations-rejected`.

## How `xxhash_intdigest` is computed

```python
import xxhash

def row_hash(source: str, target: str) -> int:
    return xxhash.xxh3_64(f"{source}\n{target}".encode("utf-8")).intdigest()
```

The hash is the **xxh3-64** intdigest of `f"{source}\n{target}"` encoded as UTF-8.
It is stable across runs and lets you deduplicate or join rows by content.

## How `claude_haiku_score` is computed

Rows are batched (default 20 / call) and sent to Claude Haiku 4.5 with the prompt below.
The model returns a JSON array of floats in `[0.0, 1.0]`; we attach each float to its
corresponding row as `claude_haiku_score`.

### Exact prompt template

```
You are a translation quality judge. Rate each TARGET translation's fluency and faithfulness to its SOURCE on a scale 0.00 to 1.00.

Rubric:
- 1.00: native-fluent target, accurately conveys source meaning, no errors
- 0.80: mostly fluent, minor errors that don't impede understanding (CUTOFF)
- 0.60: understandable but awkward; some meaning loss
- 0.40: broken grammar or significant meaning drift
- 0.20: mostly garbled / barely comprehensible
- 0.00: empty, wrong language, or not a translation at all

Source language: {src_lang}. Target language: {tgt_lang}.

Translations (return scores in the same order):
{pairs_block}

Output ONLY a JSON array of exactly {n} floats between 0.0 and 1.0. No prose. Example: [0.95, 0.4, 0.85, ...]
```

### JSON schema sent alongside the prompt

```json
{
  "type": "object",
  "properties": {
    "scores": {
      "type": "array",
      "items": {
        "type": "number",
        "minimum": 0.0,
        "maximum": 1.0
      }
    }
  },
  "required": [
    "scores"
  ],
  "additionalProperties": false
}
```

## Source

All rows come from `natgillin/translations-raw` (an OPUS / mtdata mirror).
Before any Haiku call, rows are deduplicated globally by `xxhash_intdigest`
so identical pairs are scored exactly once.