Lexical Tools

LVG - API


Java Class Api - LvgLexItemApi( )

command line/Vector of LexItems output

  • PreProcess:
    1. To instantiate an LvgLexItemApi object
      String optionStr = new String("....");      // define the option string
      LvgLexItemApi lvg = new LvgLexItemApi(optionStr);   // instantiate the LvgCmdApi
      
      or
      
      String optionStr = new String("....");      // define the option string
      LvgLexItemApi lvg = new LvgLexItemApi( );           // instantiate the LvgCmdApi
      lvg.SetOption(optionStr);                   // set the option
      	
    2. To Use other Api methods
      lvg.SetPromptStr(promptStr);               // Set the prompt string
      lvg.SetQuitStrList(quitStrList);           // Set quit string
      lvg.IsLegalOption( );                      // check if the option is legal
      lvg.PrintLvgHelp( );                       // Print out LVg help menu
      	
  • Process:
    1. ProcessLineLexItem( ): mutate an input term with Lvg prompt function
      lvg.ProcessLineLexItem(String);           // Mutate the input term with interface prompt
      	
    2. MutateLexItem( ): mutate an input term without Lvg prompt function
      lvg.MutateLexItem(String);                // Mutate the input term
      	
    3. ProcessLexItem( ): mutate an input LexItem
      lvg.ProcessLexItem(LexItem);                // Mutate an input LexItem
      	
    4. ProcessLexItems( ): mutate input LexItems
      lvg.ProcessLexItems(Vector);                // Mutate the input term
      	
    5. ProcessLexItemsFromFCO: mutate LexItems from Flow Compoment Outputs
      lvg.ProcessLexItemsFromFCO(Vector);                // Mutate the input term
      	
  • PostProcess:

    A CleanUp( ) method must be called after using LvgCmdApi to disconnect database and close persistant tries.

    lvg.CleanUp( );	                // Close database and files
    	

Sample programs were developed to illustrate above usage.

  • LVG LexItem Interface Testing Program - LvgLexItemApiTest.java
  • ProcessLexItem testing program - ProcessLexItemTest.java
  • ProcessLexItems testing program - ProcessLexItemsTest.java
  • ProcessLexItemsFromFCO testing program - ProcessLexItemsFromFCOTest.java