Skip to content

Main content

Alignment Null Support Share Tool

Account for supplied null-index alignment support on both sides without merging one-sided and double-null rows.

Loading tool…

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

  1. Enter sourceIndices, targetIndices, weights, nullIndex. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. 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 fieldMeaning and unitsAccepted input
sourceIndicesSource IndicesRequired. Array of safe integer; maximum items 256.
targetIndicesTarget IndicesRequired. Array of safe integer; maximum items 256.
weightsWeightsRequired. Array of finite number; minimum 0; maximum items 256.
nullIndexNull IndexRequired. Safe integer.
Output fieldInterpretationReturned shape
totalWeightTotal WeightRequired. Finite number.
nullSourceWeightNull Source WeightRequired. Finite number.
nullTargetWeightNull Target WeightRequired. Finite number.
bothNullWeightWeight where both indexes equal nullIndex; included in both marginal null weights.Required. Finite number.
json
{
  "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

  1. Calculation and input contract: computational-linguistics/alignment-null-support-share — tool.io

Similar or alternative tools