File size: 2,039 Bytes
41c4d49
 
 
 
 
 
 
999481b
41c4d49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# Text Embeddings

[BioCLIP 2 text embeddings of TreeOfLife-200M](txt_emb_species.npy) were generated with [`make_txt_embedding.py`](https://github.com/Imageomics/TreeOfLife-toolbox/blob/main/processing/scripts/make_txt_embedding.py),  using the [`txt_emb_species.json`](txt_emb_species.json) to provide the 7-rank Linnean taxonomic names.

## Taxonomic JSON Construction

The `JSON` was created from the [TreeOfLife-200M catalog](../catalog.parquet) through the following process:
* **Null Value Filtering:** Remove records where `kingdom` or `species` are `null`.
* **Deduplication:** Rows are deduplicated based on the combination of `kingdom`, `phylum`, `class`, `order`, `family`, `genus`, and `species`. This ensures that each unique taxonomic combination appears exactly once.
    * **Common Name Handling:** Currently, the source metadata often contains multiple common names for a single unique taxonomic combination. During processing, **the first common name encountered** for a given unique taxonomic combination is retained. We plan future improvements to establish a definitive 1-to-1 mapping or a more comprehensive common name strategy.

### Structure

The JSON file is a single top-level array. Each element within this array is itself an array of two elements:

* **Inner Array (Index 0):** A list of strings representing the full taxonomic path from `kingdom` to `species`.
* **String (Index 1):** The common name associated with that taxonomic combination.

#### Example

```json
[
  [
    [
      "Plantae",
      "Bryophyta",
      "Bryopsida",
      "Bryales",
      "Bryaceae",
      "Bryum",
      "gracile"
    ],
      ""
  ],
  [
    [
      "Animalia",
      "Chordata",
      "Aves",
      "Passeriformes",
      "Mitrospingidae",
      "Orthogonys",
      "chloricterus"
    ],
      "Olive-green tanager"
  ],
  [
    [
      "Animalia",
      "Arthropoda",
      "Insecta",
      "Lepidoptera",
      "Lycaenidae",
      "Orthomiella",
      "rantaizana"
    ],
    "Chinese Straight-wing Blue"
  ],
]
```