Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents two individual n-grams that have been matched from two texts. e.g. from a primary text and secondary text.

Hierarchy

  • Alignment

Index

Constructors

constructor

  • Instantiates a new alignment

    Parameters

    • sourceNgram: Ngram

      an n-gram from the source text

    • targetNgram: Ngram

      an n-gram from the secondary text

    Returns Alignment

Properties

Private cachedKey

cachedKey: string

Private cachedLemmaKey

cachedLemmaKey: string | undefined

sourceNgram

sourceNgram: Ngram

targetNgram

targetNgram: Ngram

Accessors

key

  • get key(): string
  • Returns the alignment key. TODO: would a regular function be faster?

    Returns string

lemmaKey

  • get lemmaKey(): string | undefined
  • Returns the alignment lemma-based key

    Returns string | undefined

source

  • Returns the n-gram from the source text.

    deprecated

    Consider using sourceNgram instead since getters have a performance hit.

    Returns Ngram

target

  • Returns the n-gram from the target text

    deprecated

    Consider using targetNgram instead since getters have a performance hit.

    Returns Ngram

Methods

Private cacheKeys

  • cacheKeys(): void
  • Caches the keys if they have not already been generated

    Returns void

toJSON

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

    Parameters

    • Default value verbose: boolean = false

      print full metadata

    Returns object

Generated using TypeDoc