Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a single alignment prediction

Hierarchy

  • Prediction

Index

Constructors

constructor

  • Instantiates a new alignment prediction

    Parameters

    • alignment: Alignment

      the alignment for which a prediction will be calculated

    Returns Prediction

Properties

Private predictedAlignment

predictedAlignment: Alignment

Private scores

scores: NumberObject

Accessors

alignment

  • Returns the alignment represented by this prediction

    Returns Alignment

confidence

  • get confidence(): number
  • Convenience method for retrieving the prediction confidence.

    Returns number

key

  • get key(): string
  • Returns the prediction key

    Returns string

scoreKeys

  • get scoreKeys(): string[]
  • Returns an array of score keys

    Returns string[]

source

  • Convenience method to access the source n-gram of the alignment

    Returns Ngram

target

  • Convenience method to access the target n-gram of the alignment.

    Returns Ngram

Methods

getScore

  • getScore(key: string): number
  • Reads a single score from this prediction.

    Parameters

    • key: string

      the score key

    Returns number

    • the score value

getScores

  • Returns a copy of the prediction scores

    Returns NumberObject

hasScore

  • hasScore(key: string): boolean
  • Checks if the score key exists.

    Parameters

    • key: string

    Returns boolean

intersects

  • Checks if this prediction intersects with another prediction.

    Parameters

    Returns boolean

setScore

  • setScore(key: string, value: number): void
  • Sets a score for this prediction

    Parameters

    • key: string

      the score key

    • value: number

      the score value

    Returns void

setScores

  • Convenience method for setting multiple scores at a time

    Parameters

    Returns void

toJSON

  • toJSON(verbose?: boolean): object
  • Outputs the prediction to json

    Parameters

    • Default value verbose: boolean = false

      print full metadata.

    Returns object

toString

  • toString(): string
  • Prints a user friendly form of the prediction

    Returns string

Generated using TypeDoc