Skip to content

Main content

Word Alignment Null Partner Flag Tool

Flag a supplied null-partner alignment convention without discovering word correspondences.

Loading tool…

Description

Return a word-alignment pair and null-partner flag.

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.

Return a word-alignment pair and null-partner flag.

When to use this tool

Use Word Alignment Null Partner Flag when checking a supplied linguistic annotation, span, alignment or text-offset convention.

How to use the tool and how it works

  1. Enter sourceIndex, targetIndex, nullTargetIndex. 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 nullAligned, alignment. Inspect nullAligned before interpreting the associated values.

Return a word-alignment pair and null-partner flag. Require whole sourceIndex >= 0 and target/nullTargetIndex >= -1; nullAligned compares the target with the supplied null sentinel, alignment serializes both indexes as JSON.1

Input fieldMeaning and unitsAccepted input
sourceIndexSource IndexRequired. Safe integer; minimum 0.
targetIndexTarget IndexRequired. Safe integer; minimum -1.
nullTargetIndexNull Target IndexRequired. Safe integer; minimum -1.
Output fieldInterpretationReturned shape
nullAlignedNull AlignedRequired. Boolean.
alignmentAlignmentRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "sourceIndex": 2,
    "targetIndex": -1,
    "nullTargetIndex": -1
  },
  "output": {
    "nullAligned": true,
    "alignment": "[2,-1]"
  }
}

Limitations and assumptions

  • The null convention and token indexes are supplied; no sentence, alignment quality or index upper bound is verified.
  • 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/word-alignment-null-partner-flag — tool.io

Similar or alternative tools