ifct2017 2.0.14 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -21
- package/README.md +1019 -71
- package/abbreviations/index.csv +78 -0
- package/abbreviations/index.d.ts +39 -0
- package/abbreviations/index.js +103 -0
- package/abbreviations/index.txt +12 -0
- package/about/build.ts +31 -0
- package/about/index.d.ts +47 -0
- package/about/index.js +110 -0
- package/about/index.txt +174 -0
- package/build.ts +115 -0
- package/carbohydrates/index.csv +8 -0
- package/carbohydrates/index.d.ts +42 -0
- package/carbohydrates/index.js +112 -0
- package/carbohydrates/index.txt +14 -0
- package/codes/index.csv +2904 -0
- package/codes/index.d.ts +36 -0
- package/codes/index.js +102 -0
- package/codes/index.txt +12 -0
- package/columndescriptions/build.ts +22 -0
- package/columndescriptions/index.csv +215 -0
- package/columndescriptions/index.d.ts +44 -0
- package/columndescriptions/index.js +119 -0
- package/columns/build.ts +23 -0
- package/columns/index.csv +215 -0
- package/columns/index.d.ts +39 -0
- package/columns/index.js +111 -0
- package/columns/index.txt +71 -0
- package/compositingcentres/index.csv +7 -0
- package/compositingcentres/index.d.ts +35 -0
- package/compositingcentres/index.js +103 -0
- package/compositingcentres/index.txt +13 -0
- package/compositions/build.ts +212 -0
- package/compositions/index.csv +543 -0
- package/compositions/index.d.ts +254 -0
- package/compositions/index.js +204 -0
- package/compositionstats/build.ts +103 -0
- package/compositionstats/index.csv +4 -0
- package/compositionstats/index.d.ts +31 -0
- package/compositionstats/index.js +97 -0
- package/contents/index.csv +21 -0
- package/contents/index.d.ts +39 -0
- package/contents/index.js +102 -0
- package/contents/index.txt +13 -0
- package/deno.lock +67 -0
- package/descriptions/index.csv +543 -0
- package/descriptions/index.d.ts +45 -0
- package/descriptions/index.js +124 -0
- package/descriptions/index.txt +15 -0
- package/energies/index.csv +6 -0
- package/energies/index.d.ts +34 -0
- package/energies/index.js +101 -0
- package/energies/index.txt +13 -0
- package/frequencydistribution/index.csv +10 -0
- package/frequencydistribution/index.d.ts +36 -0
- package/frequencydistribution/index.js +90 -0
- package/frequencydistribution/index.txt +14 -0
- package/groups/index.csv +21 -0
- package/groups/index.d.ts +46 -0
- package/groups/index.js +118 -0
- package/groups/index.txt +14 -0
- package/hierarchy/asset.csv +215 -0
- package/hierarchy/asset.txt +70 -0
- package/hierarchy/build.ts +73 -0
- package/hierarchy/index.csv +215 -0
- package/hierarchy/index.d.ts +39 -0
- package/hierarchy/index.js +100 -0
- package/hierarchy/index.txt +14 -0
- package/index.d.ts +24 -28
- package/index.js +28 -39
- package/index.test.ts +717 -0
- package/intakes/build.ts +28 -0
- package/intakes/index.csv +42 -0
- package/intakes/index.d.ts +66 -0
- package/intakes/index.js +113 -0
- package/intakes/index.txt +20 -0
- package/jonesfactors/index.csv +15 -0
- package/jonesfactors/index.d.ts +35 -0
- package/jonesfactors/index.js +105 -0
- package/jonesfactors/index.txt +12 -0
- package/languages/index.csv +22 -0
- package/languages/index.d.ts +39 -0
- package/languages/index.js +103 -0
- package/languages/index.txt +12 -0
- package/methods/build.ts +101 -0
- package/methods/index.csv +37 -0
- package/methods/index.d.ts +39 -0
- package/methods/index.js +196 -0
- package/methods/index.txt +13 -0
- package/package.json +15 -63
- package/regions/index.csv +7 -0
- package/regions/index.d.ts +36 -0
- package/regions/index.js +100 -0
- package/regions/index.txt +12 -0
- package/representations/build.ts +133 -0
- package/representations/index.csv +215 -0
- package/representations/index.d.ts +36 -0
- package/representations/index.js +91 -0
- package/retentionfactors/groups.csv +21 -0
- package/retentionfactors/index.csv +215 -0
- package/samplingunits/index.csv +36 -0
- package/samplingunits/index.d.ts +39 -0
- package/samplingunits/index.js +110 -0
- package/samplingunits/index.txt +14 -0
- package/yieldfactors/index.csv +543 -0
- package/yieldfactors/index.d.ts +57 -0
- package/yieldfactors/index.js +158 -0
- package/yieldfactors/index.txt +294 -0
- package/corpus.js +0 -6
- package/corpus.min.js +0 -1
- package/pictures.d.ts +0 -41
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// Copyright (C) 2025-26 Subhajit Sahu
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
// See LICENSE for full terms
|
|
4
|
+
import {type Composition, loadCompositions} from "../compositions/index.ts";
|
|
5
|
+
import * as path from "@std/path";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
interface Representation {
|
|
9
|
+
code: string;
|
|
10
|
+
type: string;
|
|
11
|
+
factor: number;
|
|
12
|
+
unit: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const IGNORE = new Set(['code', 'name', 'scie', 'lang', 'grup', 'regn', 'tags']);
|
|
17
|
+
const UNIT = new Map([
|
|
18
|
+
[1, 'g'],
|
|
19
|
+
[1e+3, 'mg'],
|
|
20
|
+
[1e+6, 'ug'],
|
|
21
|
+
[1e+9, 'ng'],
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
function deepEqual(a: unknown, b: unknown) {
|
|
29
|
+
if (a===b) return true;
|
|
30
|
+
if (typeof a !== typeof b) return false;
|
|
31
|
+
if (typeof a === 'object') {
|
|
32
|
+
if (a === null || b === null) return false;
|
|
33
|
+
if (Array.isArray(a)) {
|
|
34
|
+
if (!Array.isArray(b)) return false;
|
|
35
|
+
if (a.length !== b.length) return false;
|
|
36
|
+
for (let i=0, I=a.length; i<I; i++)
|
|
37
|
+
if (!deepEqual(a[i], b[i])) return false;
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
const ka = Object.keys(a as object);
|
|
41
|
+
const kb = Object.keys(b as object);
|
|
42
|
+
if (ka.length !== kb.length) return false;
|
|
43
|
+
for (const k of ka)
|
|
44
|
+
if (!deepEqual((a as Record<string, unknown>)[k], (b as Record<string, unknown>)[k])) return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
function arrayIndexOf(arr: unknown[], val: unknown) {
|
|
52
|
+
for (let i=0, I=arr.length; i<I; i++)
|
|
53
|
+
if (deepEqual(arr[i], val)) return i;
|
|
54
|
+
return -1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function imapSet(map: Map<string, number>, arr: unknown[], key: string, val: unknown) {
|
|
58
|
+
let i = arrayIndexOf(arr, val);
|
|
59
|
+
if (i<0) arr[i = arr.length] = val;
|
|
60
|
+
map.set(key, i);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
function getType(k: string) {
|
|
65
|
+
if (k==='regn') return 'integer';
|
|
66
|
+
if (k==='enerc') return 'energy';
|
|
67
|
+
if (IGNORE.has(k)) return 'string';
|
|
68
|
+
return 'mass';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
function getFactor(map: Map<string, Composition>, k: string) {
|
|
73
|
+
if (k==='regn') return 1;
|
|
74
|
+
if (IGNORE.has(k)) return 0;
|
|
75
|
+
if (k==='enerc') return 1;
|
|
76
|
+
let n = 0, s = 0;
|
|
77
|
+
for (const r of map.values()) {
|
|
78
|
+
const rk = (r as unknown as Record<string, number>)[k];
|
|
79
|
+
if (rk > 0) { s += rk; n++; }
|
|
80
|
+
}
|
|
81
|
+
if (!n) return 0;
|
|
82
|
+
const l3 = Math.log(s/n) / Math.log(1000);
|
|
83
|
+
const e = -3 * Math.round(l3 - 0.55);
|
|
84
|
+
return Math.pow(10, Math.max(e, 0));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
function getUnit(k: string, f: number) {
|
|
89
|
+
if (IGNORE.has(k)) return null;
|
|
90
|
+
if (k==='enerc') return 'kJ';
|
|
91
|
+
return UNIT.get(f) as string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
function writeIndex(records: Representation[]) {
|
|
96
|
+
let a = `code,type,factor,unit\n`;
|
|
97
|
+
for (const r of records)
|
|
98
|
+
a += `${r.code},${r.type},${r.factor},${r.unit}\n`;
|
|
99
|
+
Deno.writeTextFileSync(path.join(import.meta.dirname || "", 'index.csv'), a);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
function writeCorpus(outfile: string, map: Map<string, number>, values: Record<string, string | number>[]) {
|
|
104
|
+
let a = '';
|
|
105
|
+
for (let i=0, I=values.length; i<I; i++)
|
|
106
|
+
a += `const I${i} = ${JSON.stringify(values[i]).replace(/\"(\w+)\":/g, '$1:')};\n`;
|
|
107
|
+
a += `const CORPUS = new Map([\n`;
|
|
108
|
+
for (const [code, i] of map)
|
|
109
|
+
a += ` ["${code}", I${i}],\n`;
|
|
110
|
+
a += `]);\n`;
|
|
111
|
+
a += `module.exports = CORPUS;\n`;
|
|
112
|
+
Deno.writeTextFileSync(outfile, a);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
export async function build(corpus='corpus.js') {
|
|
117
|
+
const map = await loadCompositions();
|
|
118
|
+
const cols = Object.keys(map.get('A001') as Composition);
|
|
119
|
+
const records: Representation[] = [];
|
|
120
|
+
const values: Record<string, string | number>[] = [];
|
|
121
|
+
const representations = new Map<string, number>();
|
|
122
|
+
for (const c of cols) {
|
|
123
|
+
if (c.endsWith('_e')) continue;
|
|
124
|
+
const code = c;
|
|
125
|
+
const type = getType(c);
|
|
126
|
+
const factor = getFactor(map, c);
|
|
127
|
+
const unit = getUnit(c, factor) || '';
|
|
128
|
+
records.push({code, type, factor, unit});
|
|
129
|
+
imapSet(representations, values, code, {type, factor, unit});
|
|
130
|
+
}
|
|
131
|
+
writeIndex(records);
|
|
132
|
+
if (corpus) writeCorpus(corpus, representations, values);
|
|
133
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
code,type,factor,unit
|
|
2
|
+
code,string,0,
|
|
3
|
+
name,string,0,
|
|
4
|
+
scie,string,0,
|
|
5
|
+
lang,string,0,
|
|
6
|
+
grup,string,0,
|
|
7
|
+
regn,integer,1,
|
|
8
|
+
tags,string,0,
|
|
9
|
+
enerc,energy,1,kJ
|
|
10
|
+
water,mass,1,g
|
|
11
|
+
ash,mass,1000,mg
|
|
12
|
+
vit,mass,1000,mg
|
|
13
|
+
fatce,mass,1,g
|
|
14
|
+
cholc,mass,1000,mg
|
|
15
|
+
fibtg,mass,1,g
|
|
16
|
+
choavldf,mass,1,g
|
|
17
|
+
protcnt,mass,1,g
|
|
18
|
+
amiac,mass,1,g
|
|
19
|
+
cartoid,mass,1000,mg
|
|
20
|
+
polyph,mass,1000,mg
|
|
21
|
+
phystr,mass,1000,mg
|
|
22
|
+
tocph,mass,1000000,ug
|
|
23
|
+
toctr,mass,1000000,ug
|
|
24
|
+
orgac,mass,1000,mg
|
|
25
|
+
phytac,mass,1000,mg
|
|
26
|
+
sapon,mass,1,g
|
|
27
|
+
mnrleq,mass,1000,mg
|
|
28
|
+
mnrlet,mass,1000,mg
|
|
29
|
+
mnrlpet,mass,1000000,ug
|
|
30
|
+
mnrlnet,mass,1000000,ug
|
|
31
|
+
mnrltx,mass,1000000,ug
|
|
32
|
+
vita,mass,1000000,ug
|
|
33
|
+
vitb,mass,1000,mg
|
|
34
|
+
vitc,mass,1000,mg
|
|
35
|
+
vitd,mass,1000000,ug
|
|
36
|
+
vite,mass,1000000,ug
|
|
37
|
+
vitk,mass,1000000,ug
|
|
38
|
+
fasat,mass,1,g
|
|
39
|
+
fauns,mass,1,g
|
|
40
|
+
faess,mass,1,g
|
|
41
|
+
facis,mass,1,g
|
|
42
|
+
fatrn,mass,1,g
|
|
43
|
+
fams,mass,1,g
|
|
44
|
+
fapu,mass,1,g
|
|
45
|
+
facn3,mass,1000,mg
|
|
46
|
+
facn6,mass,1,g
|
|
47
|
+
facn9,mass,1,g
|
|
48
|
+
facn5,mass,1000,mg
|
|
49
|
+
facn7,mass,1000,mg
|
|
50
|
+
fibins,mass,1,g
|
|
51
|
+
fibsol,mass,1,g
|
|
52
|
+
cho,mass,1,g
|
|
53
|
+
starch,mass,1,g
|
|
54
|
+
olsac,mass,1000,mg
|
|
55
|
+
fsugar,mass,1,g
|
|
56
|
+
amiace,mass,1,g
|
|
57
|
+
amiacce,mass,1,g
|
|
58
|
+
amiacne,mass,1,g
|
|
59
|
+
retol,mass,1000000,ug
|
|
60
|
+
thia,mass,1000000,ug
|
|
61
|
+
ribf,mass,1000000,ug
|
|
62
|
+
nia,mass,1000,mg
|
|
63
|
+
pantac,mass,1000000,ug
|
|
64
|
+
vitb6c,mass,1000,mg
|
|
65
|
+
biot,mass,1000000,ug
|
|
66
|
+
folsum,mass,1000000,ug
|
|
67
|
+
ergcal,mass,1000000,ug
|
|
68
|
+
chocal,mass,1000000000,ng
|
|
69
|
+
doh25,mass,1000000000,ng
|
|
70
|
+
tocpha,mass,1000000,ug
|
|
71
|
+
tocphb,mass,1000000,ug
|
|
72
|
+
tocphg,mass,1000000,ug
|
|
73
|
+
tocphd,mass,1000000,ug
|
|
74
|
+
toctra,mass,1000000,ug
|
|
75
|
+
toctrb,mass,1000000,ug
|
|
76
|
+
toctrg,mass,1000000,ug
|
|
77
|
+
toctrd,mass,1000000,ug
|
|
78
|
+
vitk1,mass,1000000,ug
|
|
79
|
+
vitk2,mass,1000000,ug
|
|
80
|
+
lutn,mass,1000000,ug
|
|
81
|
+
zea,mass,1000000,ug
|
|
82
|
+
lycpn,mass,1000000,ug
|
|
83
|
+
crypxb,mass,1000000,ug
|
|
84
|
+
cartg,mass,1000000,ug
|
|
85
|
+
carta,mass,1000000,ug
|
|
86
|
+
cartb,mass,1000000,ug
|
|
87
|
+
al,mass,1000000,ug
|
|
88
|
+
as,mass,1000000,ug
|
|
89
|
+
cd,mass,1000000,ug
|
|
90
|
+
ca,mass,1000,mg
|
|
91
|
+
cr,mass,1000000,ug
|
|
92
|
+
co,mass,1000000,ug
|
|
93
|
+
cu,mass,1000000,ug
|
|
94
|
+
fe,mass,1000,mg
|
|
95
|
+
pb,mass,1000000,ug
|
|
96
|
+
li,mass,1000000,ug
|
|
97
|
+
mg,mass,1000,mg
|
|
98
|
+
mn,mass,1000000,ug
|
|
99
|
+
hg,mass,1000000000,ng
|
|
100
|
+
mo,mass,1000000,ug
|
|
101
|
+
ni,mass,1000000,ug
|
|
102
|
+
p,mass,1000,mg
|
|
103
|
+
k,mass,1000,mg
|
|
104
|
+
se,mass,1000000,ug
|
|
105
|
+
na,mass,1000,mg
|
|
106
|
+
zn,mass,1000000,ug
|
|
107
|
+
frus,mass,1,g
|
|
108
|
+
glus,mass,1000,mg
|
|
109
|
+
sucs,mass,1,g
|
|
110
|
+
mals,mass,1000,mg
|
|
111
|
+
lactose,mass,1,g
|
|
112
|
+
f4d0,mass,1000,mg
|
|
113
|
+
f6d0,mass,1000,mg
|
|
114
|
+
f8d0,mass,1,g
|
|
115
|
+
f10d0,mass,1000,mg
|
|
116
|
+
f12d0,mass,1000,mg
|
|
117
|
+
f14d0,mass,1000,mg
|
|
118
|
+
f16d0,mass,1000,mg
|
|
119
|
+
f18d0,mass,1000,mg
|
|
120
|
+
f20d0,mass,1000,mg
|
|
121
|
+
f22d0,mass,1000,mg
|
|
122
|
+
f24d0,mass,1000,mg
|
|
123
|
+
f14d1cn5,mass,1000,mg
|
|
124
|
+
f16d1cn7,mass,1000,mg
|
|
125
|
+
f18d1cn9,mass,1,g
|
|
126
|
+
f18d1tn9,mass,1,g
|
|
127
|
+
f20d1cn9,mass,1000,mg
|
|
128
|
+
f22d1cn9,mass,1,g
|
|
129
|
+
f24d1cn9,mass,1000,mg
|
|
130
|
+
f18d2cn6,mass,1,g
|
|
131
|
+
f20d2n6,mass,1000,mg
|
|
132
|
+
f18d3n3,mass,1000,mg
|
|
133
|
+
f20d4n6,mass,1000,mg
|
|
134
|
+
f11d0,mass,1000000,ug
|
|
135
|
+
f15d0,mass,1000,mg
|
|
136
|
+
f20d3n6,mass,1000,mg
|
|
137
|
+
f20d5n3,mass,1000,mg
|
|
138
|
+
f22d6n3,mass,1000,mg
|
|
139
|
+
f22d2n6,mass,1000,mg
|
|
140
|
+
f22d5n3,mass,1000,mg
|
|
141
|
+
his,mass,1000,mg
|
|
142
|
+
ile,mass,1000,mg
|
|
143
|
+
leu,mass,1000,mg
|
|
144
|
+
lys,mass,1000,mg
|
|
145
|
+
met,mass,1000,mg
|
|
146
|
+
cys,mass,1000,mg
|
|
147
|
+
phe,mass,1000,mg
|
|
148
|
+
thr,mass,1000,mg
|
|
149
|
+
trp,mass,1000,mg
|
|
150
|
+
val,mass,1000,mg
|
|
151
|
+
ala,mass,1000,mg
|
|
152
|
+
arg,mass,1000,mg
|
|
153
|
+
asp,mass,1000,mg
|
|
154
|
+
glu,mass,1000,mg
|
|
155
|
+
gly,mass,1000,mg
|
|
156
|
+
pro,mass,1000,mg
|
|
157
|
+
ser,mass,1000,mg
|
|
158
|
+
tyr,mass,1000,mg
|
|
159
|
+
oxalt,mass,1000,mg
|
|
160
|
+
oxals,mass,1000,mg
|
|
161
|
+
oxali,mass,1000,mg
|
|
162
|
+
caconac,mass,1000,mg
|
|
163
|
+
citac,mass,1000,mg
|
|
164
|
+
fumac,mass,1000,mg
|
|
165
|
+
malac,mass,1000,mg
|
|
166
|
+
quinac,mass,1000,mg
|
|
167
|
+
sucac,mass,1000,mg
|
|
168
|
+
tarac,mass,1000,mg
|
|
169
|
+
dhbenzac34,mass,1000000,ug
|
|
170
|
+
hbenzal3,mass,1000000,ug
|
|
171
|
+
pcathac,mass,1000000,ug
|
|
172
|
+
vanlac,mass,1000000,ug
|
|
173
|
+
gallac,mass,1000,mg
|
|
174
|
+
cinmac,mass,1000000,ug
|
|
175
|
+
coumaco,mass,1000000,ug
|
|
176
|
+
coumacp,mass,1000000,ug
|
|
177
|
+
caffac,mass,1000000,ug
|
|
178
|
+
chlrac,mass,1000,mg
|
|
179
|
+
ferac,mass,1000000,ug
|
|
180
|
+
apigen,mass,1000,mg
|
|
181
|
+
apigen6cgls,mass,1000000,ug
|
|
182
|
+
apigen7onshps,mass,1000,mg
|
|
183
|
+
luteol,mass,1000000,ug
|
|
184
|
+
kaemf,mass,1000,mg
|
|
185
|
+
querce,mass,1000,mg
|
|
186
|
+
querce3bdgls,mass,1000,mg
|
|
187
|
+
querce3ortns,mass,1000,mg
|
|
188
|
+
querce3bgls,mass,1000,mg
|
|
189
|
+
isormt,mass,1000,mg
|
|
190
|
+
myrct,mass,1000,mg
|
|
191
|
+
rsvrtol,mass,1000000,ug
|
|
192
|
+
hespt,mass,1000,mg
|
|
193
|
+
narng,mass,1000,mg
|
|
194
|
+
hespd,mass,1000,mg
|
|
195
|
+
daidzn,mass,1000,mg
|
|
196
|
+
gnstein,mass,1000,mg
|
|
197
|
+
epicatec,mass,1000,mg
|
|
198
|
+
epicategc,mass,1000000,ug
|
|
199
|
+
epicatgc3gal,mass,1000000,ug
|
|
200
|
+
catec,mass,1000,mg
|
|
201
|
+
galcatecgal,mass,1000000,ug
|
|
202
|
+
galcatec,mass,1000000,ug
|
|
203
|
+
syrgac,mass,1000,mg
|
|
204
|
+
sinpac,mass,1000,mg
|
|
205
|
+
ellgac,mass,1000,mg
|
|
206
|
+
rafs,mass,1000,mg
|
|
207
|
+
stas,mass,1000,mg
|
|
208
|
+
vers,mass,1000,mg
|
|
209
|
+
ajgs,mass,1000,mg
|
|
210
|
+
camt,mass,1000,mg
|
|
211
|
+
stgstr,mass,1000,mg
|
|
212
|
+
stostrb,mass,1000,mg
|
|
213
|
+
carot,mass,1000000,ug
|
|
214
|
+
xantp,mass,1000000,ug
|
|
215
|
+
cartbeq,mass,1000000,ug
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type SetupTableOptions } from "@nodef/extra-sql";
|
|
2
|
+
/** Representation of a column (as factor and unit). */ export interface Representation {
|
|
3
|
+
/** Column Code. */ code: string;
|
|
4
|
+
/** Type of physical quantity. */ type: string;
|
|
5
|
+
/** Multiplication factor. */ factor: number;
|
|
6
|
+
/** Unit symbol. */ unit: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Load the representations corpus from the file.
|
|
10
|
+
* @returns representations corpus
|
|
11
|
+
*/ export declare function loadRepresentations(): Promise<Map<string, Representation>>;
|
|
12
|
+
/**
|
|
13
|
+
* Get the path to the representations CSV file.
|
|
14
|
+
* @returns CSV file URL
|
|
15
|
+
*/ export declare function representationsCsv(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Obtain SQL command to create and populate the representations table.
|
|
18
|
+
* @param tab table name
|
|
19
|
+
* @param opt options for the table
|
|
20
|
+
* @returns CREATE TABLE, INSERT, CREATE VIEW, CREATE INDEX statements
|
|
21
|
+
*/ export declare function representationsSql(tab?: string, opt?: SetupTableOptions): Promise<string>;
|
|
22
|
+
/**
|
|
23
|
+
* Find matching representations of a column:code/name/tags query.
|
|
24
|
+
* @param txt column:code/name/tags query
|
|
25
|
+
* @returns `{code, type, factor, unit}` if found, else null
|
|
26
|
+
* @example
|
|
27
|
+
* ```javascript
|
|
28
|
+
* ifct2017.representations('his');
|
|
29
|
+
* ifct2017.representations('Histidine');
|
|
30
|
+
* // → { type: 'mass', factor: 1000, unit: 'mg' }
|
|
31
|
+
*
|
|
32
|
+
* ifct2017.representations('representation of vitamin d?');
|
|
33
|
+
* ifct2017.representations('what is unit of ergocalciferol?');
|
|
34
|
+
* // → { type: 'mass', factor: 1000000000, unit: 'ng' }
|
|
35
|
+
* ```
|
|
36
|
+
*/ export declare function representations(txt: string): Representation | null;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// Copyright (C) 2025-26 Subhajit Sahu
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
3
|
+
// See LICENSE for full terms
|
|
4
|
+
import * as csv from "@std/csv";
|
|
5
|
+
import { setupTable } from "@nodef/extra-sql";
|
|
6
|
+
import { loadColumns, columns } from "../columns/index.js";
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region GLOBALS
|
|
9
|
+
let corpus = null;
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region FUNCTIONS
|
|
12
|
+
/**
|
|
13
|
+
* Load the representations corpus from CSV file.
|
|
14
|
+
* @param file CSV file path
|
|
15
|
+
* @returns representations corpus
|
|
16
|
+
*/ async function loadFromCsv(file) {
|
|
17
|
+
const map = new Map();
|
|
18
|
+
const data = await (await fetch(file)).text();
|
|
19
|
+
const records = csv.parse(data, {
|
|
20
|
+
skipFirstRow: true,
|
|
21
|
+
comment: "#"
|
|
22
|
+
});
|
|
23
|
+
for (const r of records){
|
|
24
|
+
const factor = parseFloat(r.factor) || 1;
|
|
25
|
+
map.set(r.code, {
|
|
26
|
+
code: r.code,
|
|
27
|
+
type: r.type,
|
|
28
|
+
factor,
|
|
29
|
+
unit: r.unit
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return map;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Load the representations corpus from the file.
|
|
36
|
+
* @returns representations corpus
|
|
37
|
+
*/ export async function loadRepresentations() {
|
|
38
|
+
if (corpus) return corpus;
|
|
39
|
+
const p = loadColumns();
|
|
40
|
+
corpus = await loadFromCsv(representationsCsv());
|
|
41
|
+
await p;
|
|
42
|
+
return corpus;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Get the path to the representations CSV file.
|
|
46
|
+
* @returns CSV file URL
|
|
47
|
+
*/ export function representationsCsv() {
|
|
48
|
+
return import.meta.resolve('./index.csv');
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Obtain SQL command to create and populate the representations table.
|
|
52
|
+
* @param tab table name
|
|
53
|
+
* @param opt options for the table
|
|
54
|
+
* @returns CREATE TABLE, INSERT, CREATE VIEW, CREATE INDEX statements
|
|
55
|
+
*/ export async function representationsSql(tab = "representations", opt = {}) {
|
|
56
|
+
return setupTable(tab, {
|
|
57
|
+
code: "TEXT",
|
|
58
|
+
type: "TEXT",
|
|
59
|
+
factor: "REAL",
|
|
60
|
+
unit: "TEXT"
|
|
61
|
+
}, (await loadRepresentations()).values(), Object.assign({
|
|
62
|
+
pk: "code",
|
|
63
|
+
index: true,
|
|
64
|
+
tsvector: {
|
|
65
|
+
code: "A",
|
|
66
|
+
type: "B",
|
|
67
|
+
unit: "C"
|
|
68
|
+
}
|
|
69
|
+
}, opt));
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Find matching representations of a column:code/name/tags query.
|
|
73
|
+
* @param txt column:code/name/tags query
|
|
74
|
+
* @returns `{code, type, factor, unit}` if found, else null
|
|
75
|
+
* @example
|
|
76
|
+
* ```javascript
|
|
77
|
+
* ifct2017.representations('his');
|
|
78
|
+
* ifct2017.representations('Histidine');
|
|
79
|
+
* // → { type: 'mass', factor: 1000, unit: 'mg' }
|
|
80
|
+
*
|
|
81
|
+
* ifct2017.representations('representation of vitamin d?');
|
|
82
|
+
* ifct2017.representations('what is unit of ergocalciferol?');
|
|
83
|
+
* // → { type: 'mass', factor: 1000000000, unit: 'ng' }
|
|
84
|
+
* ```
|
|
85
|
+
*/ export function representations(txt) {
|
|
86
|
+
if (corpus == null) return null;
|
|
87
|
+
const ms = columns(txt);
|
|
88
|
+
if (ms.length === 0) return null;
|
|
89
|
+
return corpus.get(ms[0].code) || null;
|
|
90
|
+
} //#endregion
|
|
91
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZpbGU6Ly8vaG9tZS9ydW5uZXIvd29yay9pZmN0MjAxNy9pZmN0MjAxNy9yZXByZXNlbnRhdGlvbnMvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29weXJpZ2h0IChDKSAyMDI1LTI2IFN1Ymhhaml0IFNhaHVcbi8vIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBR1BMLTMuMC1vci1sYXRlclxuLy8gU2VlIExJQ0VOU0UgZm9yIGZ1bGwgdGVybXNcbmltcG9ydCAqIGFzIGNzdiAgZnJvbSBcIkBzdGQvY3N2XCI7XG5pbXBv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tJQUFHO0VBQUMsR0FBRztBQUMxRjtBQUdBOzs7Ozs7Ozs7Ozs7OztDQWNDLEdBQ0QsT0FBTyxTQUFTLGdCQUFnQixHQUFXO0VBQ3pDLElBQUksVUFBVSxNQUFNLE9BQU87RUFDM0IsTUFBTSxLQUFLLFFBQVE7RUFDbkIsSUFBSSxHQUFHLE1BQU0sS0FBRyxHQUFHLE9BQU87RUFDMUIsT0FBTyxPQUFPLEdBQUcsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLElBQUksS0FBRztBQUNqQyxFQUNBLFlBQVkifQ==
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
code,grup,steaming,steaming_bioavailability,roasting,roasting_bioavailability,microwaving,microwaving_bioavailability,grilling,grilling_bioavailability,frying,frying_bioavailability,boiling,boiling_bioavailability
|
|
2
|
+
A,Cereals and Millets,vitws=0.85,vitws=0.85; vitfs=0.9; mnrl=0.6,vitws=0.9,fe=0.7; zn=0.7; vitb=0.9,vitws=0.9,fe=0.7; zn=0.7; ca=0.7; protcnt=0.9; starch=1.1,vitb=0.9,fe=0.9; zn=0.9; ca=0.9,vitc=0.8; vitb1=0.9; vitb9=0.9; fapu=0.95,fe=0.7,vitb=0.95; k=0.9; mg=0.9,protcnt=1.1
|
|
3
|
+
B,Grain Legumes,vitb=0.8; vitc=0.8,vitb=0.8; vitc=0.8; vitfs=0.9; mnrl=0.55,vitws=0.85; polyph=0.85,protcnt=1.1; fe=0.75; zn=0.75,vitws=0.85; mnrl=0.95,protcnt=1.1; fe=0.7; zn=0.7,protcnt=0.95; vitb=0.85,fe=0.8; zn=0.8; ca=0.8,vitc=0.75; vitb9=0.85; fapu=0.9; tocph=0.9,protcnt=1.1; fe=0.6,vitb=0.75; vitc=0.75; protcnt=0.9; polyph=0.7; phytac=0.7,fe=1.2; zn=1.2; protcnt=1.15
|
|
4
|
+
C,Green Leafy Vegetables,vitk=1.1,vitk=1.1; mnrl=0.9,vitc=0.6; vitb=0.75; cartoid=0.85,fe=0.6; cartoid=1.2,vitc=0.8; vitb9=1.1; vitfs=1.1,fe=0.5; vitk=1.05,vitc=0.7; vitb=0.8,,vitc=0.5; vitb9=0.6; vitb1=0.7; fapu=0.85; carot=1.1; tocph=1.1,vita=1.3; fe=0.5,vitc=0.5; vitb=0.5; k=0.6; mg=0.6; cartoid=1.1; fe=0.75,cartoid=1.25; fe=0.8
|
|
5
|
+
D,Other Vegetables,vitc=0.925; cartb=0.85,mnrl=0.95,vitc=0.7; cartoid=0.9; vitb=0.85,vita=1.2; fe=0.7,vitc=0.9; vitfs=1.1; mnrl=1.1,cartoid=1.2; polyph=1.1,vitc=0.75; vitb=0.85,,vitc=0.6; vitb9=0.7; fapu=0.85; cartoid=1.1; tocph=1.1,vita=1.25; fe=0.6,vitc=0.65; vitb=0.8; k=0.85; mg=0.85; cartoid=1.1,
|
|
6
|
+
E,Fruits,vitc=0.8; vitb=0.85,,vitc=0.55; cartoid=0.925; polyph=0.75,cartoid=1.3; vitc=0.6,vitc=0.7; cartoid=1.2; polyph=0.85,polyph=0.9,vitc=0.65; vitb=0.85,,vitc=0.4; vitb9=0.6; fsugar=0.9; fapu=0.85,vitc=1.1,vitc=0.6; vitb=0.6; polyph=0.8; cartoid=1.05,cartoid=1.2
|
|
7
|
+
F,Roots and Tubers,vitc=0.725; cartb=0.85,vitc=0.9; mnrl=0.9,vitc=0.75,cartoid=1.3; starch=1.1,mnrl=0.85,starch=1.1; fe=0.7,choavldf=0.9; starch=0.9; vitc=0.8,,vitc=0.6; carot=1.1; fapu=0.9,carot=1.25; starch=1.1,vitc=0.7; k=0.8,cartoid=1.25
|
|
8
|
+
G,Condiments and Spices,,,vitc=0.65; vitb=0.65; polyph=0.85,,vitws=0.8; vitfs=0.95; polyph=0.925,polyph=1.1; mnrl=0.8,polyph=0.8,,vitc=0.5; polyph=0.8; carot=1.1; tocph=1.1,polyph=1.15; cartoid=1.25,polyph=0.8; flvnd=0.8; essoil=0.85,
|
|
9
|
+
H,Nuts and Oil Seeds,vitfs=1.05; vitws=0.9,mnrl=0.7; vitws=0.9,vitfs=0.85; fapu=0.85; protcnt=0.85,vite=1.1,vite=0.9,mnrl=0.8,vit=0.85,,fapu=0.85; tocph=0.9,,,fe=1.25; zn=1.25
|
|
10
|
+
I,Sugars,,mnrl=0.9,fsugar=0.9; vitc=0.6; polyph=0.85,fe=1.1,fsugar=0.975; vitb=0.775,fe=0.8,,,fsugar=0.85; sucs=0.8,,,
|
|
11
|
+
J,Mushrooms,vitb=0.9; polyph=0.95,vitd=1.2; mnrl=1.1; polyph=1.1,vitb=0.9; polyph=0.85; protcnt=0.95,vitd2=1.2; protcnt=1.1,polyph=1.2,polyph=1.2,vitb=0.9; vitd=0.8,,vitc=0.5; vitb=0.78; vitd=0.9,mnrl=1.1,vitb=0.8; k=0.8; mnrl=0.9,
|
|
12
|
+
K,Miscellaneous Foods,polyph=0.95; vit=0.95,,vitc=0.5; fsugar=0.9,,vitc=0.7; fsugar=0.95; orgac=0.95; mnrl=0.975,,,,vitc=0.3; fsugar=0.8,,,
|
|
13
|
+
L,Milk and Milk Products,vitws=0.975,vitws=1.2; vitfs=1.1; mnrl=1.2,vitb2=0.9; vitfs=0.95,vita=1.2; vitd=1.2,vitd=1.1,ca=1.1,protcnt=0.95; vitb12=0.9; ca=0.9,,vitb=0.85; vitd=0.95; vita=0.95; cholc=0.95; protcnt=0.98,vita=1.25; vitd=1.25; protcnt=1.15,vitc=0.75; vitb=0.75,protcnt=1.1
|
|
14
|
+
M,Egg and Egg Products,,vita=1.3; vitd=1.3; vitb12=1.3; mnrl=1.1,vitd=0.9,protcnt=1.1; biot=1.2,vitb12=0.65,fe=1.3; zn=1.1,protcnt=0.95; vitb=0.9; vitd=0.9,fe=1.2; vitb12=1.2,vitb=0.85; vitd=0.95; vita=0.95; fapu=0.9; cholc=0.9,protcnt=1.2; fe=1.25,vitb=0.85,protcnt=1.25
|
|
15
|
+
N,Poultry,,fe=1.5; vitb12=1.3; vitb3=1.3; vitb6=1.3; vitfs=1.1,vitb=0.825; vitfs=0.9; mnrl=0.975,fe=1.75; zn=1.75; protcnt=1.1,vitb12=0.65,fe=1.3; zn=1.1,protcnt=0.95; vitb=0.85,fe=1.2; zn=1.2; vitb12=1.2,vitb=0.85; fapu=0.85; cholc=0.9,fe=1.4; protcnt=1.2,vitb=0.65; fe=0.95; zn=0.95; protcnt=0.95; fatce=0.85,fe=1.3; zn=1.3; protcnt=1.3
|
|
16
|
+
O,Animal Meat,,fe=1.5; vitb12=1.3; vitb3=1.3; vitb6=1.3; vitfs=1.1,vitb=0.825; vitfs=0.9; mnrl=0.975,fe=1.75; zn=1.75; protcnt=1.1,vitb12=0.65,fe=1.3; zn=1.1,protcnt=0.95; vitb=0.8,fe=1.3; zn=1.3; vitb12=1.3,vitb=0.8; fapu=0.85; cholc=0.9,fe=1.5; protcnt=1.25,vitb=0.55; fe=0.95; zn=0.95; fatce=0.8,fe=1.35; zn=1.35
|
|
17
|
+
P,Marine Fish,,fatcn3=1.4; vitb12=1.3; vitd=1.3; mnrl=1.2,facn3=0.85; vitb=0.8; vitd=0.95,facn3=1.5; vitd=1.5; i=1.2; se=1.2,vitd=1.1,protcnt=1.2; mnrl=1.2; fe=1.2,protcnt=0.95; fatce=0.95; vitd=0.9; vitb=0.9,i=1.3; vitd=1.3; fatcn3=1.3,fapu=0.75; vitd=0.9; vitb=0.85; cholc=0.9,fatcn3=1.1; protcnt=1.25; fe=1.35,vitb=0.7; fe=0.95; zn=0.95; i=0.95; fatcn3=0.9,fe=1.35; zn=1.35; i=1.35
|
|
18
|
+
Q,Marine Shellfish,,fatcn3=1.4; vitb12=1.3; vitd=1.3; mnrl=1.2,facn3=0.85; vitb=0.8; vitd=0.95,,vitd=1.1,protcnt=1.2; mnrl=1.2; fe=1.2,protcnt=0.9; vitb=0.8,zn=1.2; se=1.2; vitb12=1.2,vitb=0.85; fapu=0.8; cholc=0.9,zn=1.3; fe=1.3; protcnt=1.2,vitb=0.7; fe=0.95; zn=0.95; i=0.95; fatcn3=0.9,fe=1.35; zn=1.35; i=1.35
|
|
19
|
+
R,Marine Mollusks,,fatcn3=1.4; vitb12=1.3; vitd=1.3; mnrl=1.2,facn3=0.85; vitb=0.8; vitd=0.95,,vitd=1.1,protcnt=1.2; mnrl=1.2; fe=1.2,protcnt=0.9; vitb=0.85,fe=1.1; zn=1.1; vitb12=1.1,vitb=0.85; fapu=0.75,fe=1.3; zn=1.3; protcnt=1.2,vitb=0.7; fe=0.95; zn=0.95; i=0.95; fatcn3=0.9,
|
|
20
|
+
S,Fresh Water Fish and Shellfish,,fatcn3=1.4; vitb12=1.3; vitd=1.3; mnrl=1.2,facn3=0.85; vitb=0.8; vitd=0.95,,vitd=1.1,protcnt=1.2; mnrl=1.2; fe=1.2,protcnt=0.95; vitd=0.9; vitb=0.9,,fapu=0.8; vitd=0.85,fe=1.25; protcnt=1.25,vitb=0.75; vitc=0.75; protcnt=0.95; fe=0.95,protcnt=1.3; fe=1.3
|
|
21
|
+
T,Edible Oils and Fats,,vitfs=1.1,vitfs=0.95,vitfs=1.3; cartoid=1.3,fapu=0.9; vite=0.875; phystr=0.9,vitfs=1.2,vite=0.9,,fapu=0.78; fams=0.9; tocph=0.8,,,
|