LexBuild

LexBuild - Fix Hidden Records

LexBuild uses INFL_VARS DB table to find records in close match and search by term for records in LEXICON. Similarly, it used INFL_VARS_TEMP DB tables to find records waiting for approval. The data of inflectional variables are updated on the real-time base when records are submitted and approved. However, some unknown/unexpected action causes these data not align with data in the LEX_RECORD (due to some Database exception). Some records exist in LEX_RECORD and do not have corresponding INFL_VARS records. There records are considered as hidden records since they exist and can't be found by close match or search by term. This feature is a post-processing program to fix this problem when records are hidden.

Program:

shell> $LEXBUILD_DIR/Tools/PostProcessing/FixHiddenRecords
shell> $LEXBUILD_DIR/Tools/WebScript/FixHiddenRecords <db:1|2> <message file>

Inputs:

N/A

Approach:

  • Generate all lexical records (including deleted records) from DB LEX_RECORD table to file:
    • LEX_RECORDS.data
    • LEX_RECORDS_TEMP.data
  • Generate inflectional variables (inflVars.data) from above file:
    • INFL_VARS.data
    • INFL_VARS_TEMP.data
  • Copy above two files (for reload back to database tables):
    • inflVars.bak
    • inflVarsTemp.bak
  • Sort and unify (sort -u) above two files (to see if there is a problem):
    • INFL_VARS.data.sortU
    • INFL_VARS_TEMP.data.sortU
  • Delete records from INFL_VARS table (or drop and create INFL_VARS table)
  • Load data from above files:
    • inflVars.bak to INFL_VARS
    • inflVarsTemp.bak to INFL_VARS_TEMP

Outputs:

  • Output directory: $LEXBUILD_DIR/data/WebApp/Outputs/PostProc/HiddenRecords/
  • Data flows:
    • DB LEX_RECORD
    • LEX_RECORDS.data
    • INFL_VARS.data
    • inflVars.bak
    • DB INFL_VARS
  • Perform similar action to LEX_RECORD_TEMP and INFL_VARS_TEMP