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.
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).
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
A category is the part of speech. A Category class extends from BitMaskBase class. Category variants are described as follows:
|0||1||adj||1||2 ||adv ||2||4 ||aux ||3||8 ||compl ||4||16 ||conj ||5||32 ||det ||6||64 ||modal ||. ||7||128 ||noun ||8||256 ||prep ||9||512 ||pron ||10||1024 ||verb |
An inflection is the principle part. An Inflection class extends from BitMaskBase class. Inflection variants are described as follows:
|0||1||base||.||1|| 2 ||comparative ||.||2|| 4 ||superlative ||.||3|| 8 ||plural ||4|| 16 ||presPart ||5|| 32 ||past ||.||6|| 64 ||pastPart ||.||7|| 128 ||pres3s ||.||8|| 256 ||positive ||.||9|| 512 ||singular ||10|| 1024 ||infinitive ||11|| 2048 ||pres123p ||.||12|| 4096 ||pastNeg ||.||13|| 8192 ||pres123pNeg ||.||14|| 16384 ||pres1s ||.||15|| 32768 ||past1p23pNeg ||.||16|| 65536 ||past1p23p ||.||17|| 131072 ||past1s3sNeg ||.||18|| 262144 ||pres1p23p ||.||19|| 524288 ||pres1p23pNeg ||.||20|| 1048576 ||past1s3s ||.||21|| 2097152 ||pres ||.||22|| 4194304 ||pres3sNeg ||.||23|| 8388608 ||presNeg ||.|
- pres: present
- past: past
- Part: participle
- 1: first personal
- 2: second personal
- 3: third personal
- s: singular
- p: plural
- Neg: Negative
A Gender class extends from BitMaskBase class. Gender is used in certain language, such as French. Gender variants are described as follows:
|0||1||male||1|| 2 ||female ||2|| 4 ||neuter ||.||3|| 8 ||notKnowable ||.
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 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.