egrace479 commited on
Commit
ad3b59e
·
verified ·
1 Parent(s): 283ae52

Add text embeddings description

Browse files
Files changed (1) hide show
  1. embeddings/README.md +60 -0
embeddings/README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Text Embeddings
2
+
3
+ [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.
4
+
5
+ ## Taxonomic JSON Construction
6
+
7
+ The `JSON` was created from the [TreeOfLife-200M catalog](../catalog.parquet) through the following process:
8
+ * **Null Value Filtering:** Remove records where `kingdom`, `phylum`, `class`, `order`, `family`, `genus`, or `species` are `null`.
9
+ * **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.
10
+ * **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.
11
+
12
+ ### Structure
13
+
14
+ The JSON file is a single top-level array. Each element within this array is itself an array of two elements:
15
+
16
+ * **Inner Array (Index 0):** A list of strings representing the full taxonomic path from `kingdom` to `species`.
17
+ * **String (Index 1):** The common name associated with that taxonomic combination.
18
+
19
+ #### Example
20
+
21
+ ```json
22
+ [
23
+ [
24
+ [
25
+ "Plantae",
26
+ "Bryophyta",
27
+ "Bryopsida",
28
+ "Bryales",
29
+ "Bryaceae",
30
+ "Bryum",
31
+ "gracile"
32
+ ],
33
+ ""
34
+ ],
35
+ [
36
+ [
37
+ "Animalia",
38
+ "Chordata",
39
+ "Aves",
40
+ "Passeriformes",
41
+ "Mitrospingidae",
42
+ "Orthogonys",
43
+ "chloricterus"
44
+ ],
45
+ "Olive-green tanager"
46
+ ],
47
+ [
48
+ [
49
+ "Animalia",
50
+ "Arthropoda",
51
+ "Insecta",
52
+ "Lepidoptera",
53
+ "Lycaenidae",
54
+ "Orthomiella",
55
+ "rantaizana"
56
+ ],
57
+ "Chinese Straight-wing Blue"
58
+ ],
59
+ ]
60
+ ```