LVG Transformations (Flow Components)

Flow
Lvg transforms text via a flow. A flow is composed of several flow components. Lvg is capable of handling a flow (a series of flow components) or multiple (parallel) flows.

Transformation
In the new Java version of LVG, a flow component is called as a transformation. The transformation class is the base class for all flow classes and provides basic functions such as UpdateFlowHistory( ) and GetResults( ). A public method, Mutate( ), is implemented in all flow classes and performs the feature of transforming text. This Mutate( ) method take one LexItem as the input and return a Vector of LexItem(s).

LexItem
The LexItem class is redesigned in Java version of LVG. A LexItem is the object of a lexical element. It contains all information about a lexical element, including:

  • original term: the original term before come into a flow
  • input term: the input term for this flow component
  • output term: the output term for this flow component
  • input category: the input category for this flow component
  • output category: the output category for this flow component
  • input inflection: the input inflection for this flow component
  • output inflection: the output inflection for this flow component
  • input gender: the input gender for this flow component
  • output gender: the output gender for this flow component
  • flow history: all executed flow components in a flow
  • transfer history: detail transformation history information for a flow

Category
A category is the part of speech. A Category class extends from BitMaskBase class. Category variants are described as follows:

Bit Value Variant Other Symbols Example
01 adj
  • adjective
  • ADJ
  • red
  • 12 adv
  • adverb
  • ADV
  • quickly
  • 24 aux
  • auxiliary
  • be
  • is
  • are
  • do
  • have
  • has
  • 38 compl
  • complementizer
  • that
  • 416 conj
  • conjunction
  • CON
  • con
  • and
  • or
  • but
  • 532 det
  • determiner
  • DET
  • a
  • the
  • some
  • each
  • 664 modal .
  • can
  • dare
  • may
  • must
  • ought
  • shall
  • will
  • 7128 noun
  • NOM
  • NPR
  • dog
  • 8256 prep
  • preposition
  • PRE
  • pre
  • to
  • on
  • in
  • at
  • by
  • 9512 pron
  • pronoun
  • it
  • he
  • they
  • 101024 verb
  • VER
  • ver
  • break
  • Inflection
    An inflection is the principle part. An Inflection class extends from BitMaskBase class. Inflection variants are described as follows:

    Bit Value Variant Other Symbols Example
    0 1 base .
  • dog
  • break
  • red
  • quickly
  • 1 2 comparative .
  • redder
  • 2 4 superlative .
  • reddest
  • 3 8 plural
  • p
  • dogs
  • 4 16 presPart
  • ing
  • breaking
  • 5 32 past .
  • broke
  • 6 64 pastPart .
  • broken
  • 7 128 pres3s .
  • breaks
  • 8 256 positive .
  • red
  • 9 512 singular
  • s
  • dog
  • 10 1024 infinitive
  • inf
  • break
  • 11 2048 pres123p .
  • break
  • 12 4096 pastNeg .
  • didn't
  • couldn't
  • wouldn't
  • shouldn't
  • 13 8192 pres123pNeg .
  • don't
  • won't
  • 14 16384 pres1s .
  • am
  • 15 32768 past1p23pNeg .
  • weren't
  • 16 65536 past1p23p .
  • were
  • 17 131072 past1s3sNeg .
  • wasn't
  • 18 262144 pres1p23p .
  • are
  • 19 524288 pres1p23pNeg .
  • aren't
  • 20 1048576 past1s3s .
  • was
  • 21 2097152 pres .
  • can
  • 22 4194304 pres3sNeg .
  • isn't
  • hasn't
  • 23 8388608 presNeg .
  • can't
  • cannot
  • where:

    • pres: present
    • past: past
    • Part: participle
    • 1: first personal
    • 2: second personal
    • 3: third personal
    • s: singular
    • p: plural
    • Neg: Negative

    Gender
    A Gender class extends from BitMaskBase class. Gender is used in certain language, such as French. Gender variants are described as follows:

    Bit Value Variant Other Symbols Example
    0 1 male
  • m
  • sun
  • 1 2 female
  • f
  • moon
  • 2 4 neuter .
  • calculator
  • 3 8 notKnowable
  • -
  • .

    Flow (class)
    A Flow class extends from BitMaskBase class. It is used as enumeration for all flow components. Please note Flow class is different from Transformation class in Java implementation.

    BitMaskBase
    BitMaskBase class is the base class for Category, Inflection, Gender, Flow. This class provides basic bit mask operation, such as:

    • BitMaskBase( ): construct a bit mask object by giving a value in long.
    • GetMaskValue( ): return the value in long by specifying the bit number.
    • Enumerate( ): return the value in long by giving a string (one bit).
    • ToValue( ): return the value in long by giving a string (multiple bits)
    • GetName( ): return the value in String by specifying the bit number (one bit).
    • ToString( ): return the value in String by giving a long value.
    • Contains( ): check if a long contains all bits of another long.