Description
Summarize alignment weight at supplied null indexes.
Language-processing records depend on tokenization, indexing, null sentinels and text representation. A UTF-8 byte offset, UTF-16 index, dependency link or literal feature label can be handled precisely without inferring linguistic correctness or semantic equivalence.
Summarize alignment weight at supplied null indexes.
When to use this tool
Use Alignment Null Support Share when checking a supplied linguistic annotation, span, alignment or text-offset convention.
How to use the tool and how it works
- Enter sourceIndices, targetIndices, weights, nullIndex. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read totalWeight, nullSourceWeight, nullTargetWeight, bothNullWeight. Use the output convention below.
Summarize alignment weight at supplied null indexes. Require aligned source/target/weight arrays and nonnegative weights; return totalWeight, nullSourceWeight, nullTargetWeight and bothNullWeight.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| sourceIndices | Source Indices | Required. Array of safe integer; maximum items 256. |
| targetIndices | Target Indices | Required. Array of safe integer; maximum items 256. |
| weights | Weights | Required. Array of finite number; minimum 0; maximum items 256. |
| nullIndex | Null Index | Required. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| totalWeight | Total Weight | Required. Finite number. |
| nullSourceWeight | Null Source Weight | Required. Finite number. |
| nullTargetWeight | Null Target Weight | Required. Finite number. |
| bothNullWeight | Weight where both indexes equal nullIndex; included in both marginal null weights. | Required. Finite number. |
{
"input": {
"sourceIndices": [
0,
-1,
-1
],
"targetIndices": [
1,
2,
-1
],
"weights": [
2,
3,
1
],
"nullIndex": -1
},
"output": {
"totalWeight": 6,
"nullSourceWeight": 4,
"nullTargetWeight": 1,
"bothNullWeight": 1
}
} Limitations and assumptions
- These are weight totals, not normalized shares; both-null records belong to both marginal null totals.
- 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.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the appropriate tokenizer, Unicode and annotation-format conventions and validate the complete text or tree for full linguistic processing.
References
Similar or alternative tools
- Word Alignment Null Partner Flag
Return a word-alignment pair and null-partner flag.
- Word Alignment Fertility Count
Count distinct nonnull targets aligned to one source token.