Description
Check unitToken by exact membership in allowedUnits.
Exact label matching answers whether supplied strings agree under a chosen vocabulary. It preserves a useful distinction between missing, unknown, ambiguous, and unrecognized records.
Check unitToken by exact membership in allowedUnits.
When to use this tool
Use Product Label Unit Token when you need an explicit record-label comparison or deterministic key.
How to use the tool and how it works
- Enter amountToken, unitToken, source, allowedUnits. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read unitListed, sourceKey, amountPreserved. Inspect unitListed before interpreting the associated values.
Check unitToken by exact membership in allowedUnits. Preserve amountToken unchanged and serialize source with unitToken as a JSON array key.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| amountToken | Amount Token | Required. Text; maximum UTF-16 length 8192. |
| unitToken | Unit Token | Required. Text; maximum UTF-16 length 8192. |
| source | Source identifier or source selector, interpreted under the calculation above. | Required. Text; maximum UTF-16 length 8192. |
| allowedUnits | Allowed Units | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| unitListed | Unit Listed | Required. Boolean. |
| sourceKey | Serialized source-scoped key preserving the supplied token. | Required. Text; maximum UTF-16 length 8192. |
| amountPreserved | Amount Preserved | Required. Text; maximum UTF-16 length 8192. |
{
"input": {
"amountToken": "10",
"unitToken": "mg",
"source": "label-A",
"allowedUnits": [
"mg",
"g"
]
},
"output": {
"unitListed": true,
"sourceKey": "[\"label-A\",\"mg\"]",
"amountPreserved": "10"
}
} Limitations and assumptions
- This does not parse the amount or verify a recognized unit's physical meaning.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Normalize or reconcile identifiers only under a documented policy, then verify the underlying source records separately.
References
Similar or alternative tools
- Evidence Claim Qualifier Token
Reject duplicate suppliedQualifiers, then return exact token membership and its zero-based index, or -1 when absent.
- Public Transliteration Emphatic Token
Return exact membership of token in suppliedEmphaticTokens.