LexBuild

Close Match - Process

  • Major Functions
    • Find close matches
      • Use GSpell.find(term) to find the neighborhood of input term, candidates
      • Use InflVars table to find the Eui for each candidates terms
      • Return LexRecord for each Eui
    • Update dictionaries
      • Update LexiconLb when a new record is approved
      • Update LexiconLbTemp when a new record is submitted
      • Reindex/reload LexiconLbTemp daily

  • Major GSpell APIs
    API methodDescriptions
    Candidate candidates[] = gSpell.find(term);
    
    gspell.freeCandidates( );
    Find close match candidates of a term
    gspell.update(term);
    To index a new term
    gspell.save( );
    To save index from cash to a dictionary file
    gspell.cleanup();
    To save and quit gspell
    gspell.reload();
    To reload dictionary file
    gspell.isBusy();
    To check if dictionary complete save( )
    gspell.set(Boolean);
    To set status of busy flag in gspell

  • Implementation
    • Find the exact match (by term)
      • Java method: global.exactMatch.FindNotPendingMatchByInflVar( )
        => Get exact match from INFL_VARS and LEX_RECORD where record is not pending
      • Java method: global.exactMatch.FindExactMatchByInflVarTemp( )
        => Get exact match from INFL_VARS_TEMP and LEX_RECORD_TEMP
    • Find close match
      • Java method: global.closeMatch.FindCloseMatch( )
      • Java method: global.closeMatchTemp.FindCloseMatch( )
    • Display matches
      • Display and highlight exact match from LEX_RECORD
      • Don't display pending records
      • Display close match from LEX_RECORD (which are not included in exact match).
      • Highlight with red for deleted records (link to restore option)
      • Provide edit and delete option link for all other records

      • Display and highlight exact match from LEX_RECORD_TEMP
      • Display close match from LEX_RECORD_TEMP (which are not included in exact match).
      • No further options are provided for these records (use approval sub-menu for further options)

    • Add (update) index to LexiconLb and LexiconLbTemp dictionaries

      • LexiconLb
        Last ActionDescriptionJSP files
        Create (1)Add index of inflVars from INFL_VARS_TEMP during approval
        • ./approval/createRecord.jsp
        • ./approval/create.jsp
        Modify (2)Add index of inflVars from INFL_VARS_TEMP during approval
        • ./approval/modifyRecord.jsp
        • ./approval/modify.jsp
        Delete (3)NoneNone
        Pending (4)N/AN/A
        Restore (5)None (because indexes were never removed)None

      • LexiconLbTemp
        Last ActionDescriptionJSP files
        Create (1)Add index of inflVars from INFL_VARS_TEMP after submit./submit/createConfirm.jsp
        Modify (2)Add index of inflVars from INFL_VARS_TEMP after submit./submit/modifyConfirm.jsp
        Delete (3)Add index of inflVars from INFL_VARS_TEMP after submit./submit/deleteConfirm.jsp
        Pending (4)N/AN/A
        Restore (5)Add index of inflVars from INFL_VARS_TEMP after submit./submit/restoreConfirm.jsp
        ReEdit Locked - Create (10)Add index of inflVars from INFL_VARS_TEMP after reEdit./submit/reEditConfirm.jsp
        ReEdit Locked - Modify (11)Add index of inflVars from INFL_VARS_TEMP after reEdit./submit/reEditConfirm.jsp

    • Save index from Cash to LexiconLb dictionaries
      It takes about 70 sec. to save index from cash to LexiconLb dictionary file. It is too slow for this web application. Thus, the design for this save event are described in post Process.