LexBuild

First time Deployment

  1. Prepare data files: lexicon.in (Migration from the old LexBuild)
    • Get the Lexicon file from Allen Browne and put into $LEXBUILD/Lexicon/2004/Allen.mm.dd.yy
    • Manually fix this file and put into lexicon.modify according to Lexicon build procedure notes

      Then, run lexCheck:

      > $LEXBUILD/Tools/LexiconFix/LexCheck -t < ../../Lexicon/2004/Allen.10.16.03/lexicon.modify > ../../Lexicon/2004/Allen.10.16.03/lexicon.fix

      Make sure lexicon.modify is identical to lexicon.fix at this point.

    • Add base to irreg for Noun, Verb, Adj, and Adv. This fix requires manual fix, code change and recompile in LexCheck as follows:
      • Code Change & recompile: UpdatexxxVariants: add base to irreg|base|...
        Where xxx: Noun, Verb, Adj, Adv

      • Manually add base to irreg for Noun: group(irreg|sss|ppp|)
        • variants=group(irreg|corps|): E0019110
        • variants=group(irreg|Gullys|): E0334369

        > $LEXBUILD/Tools/LexiconFix/LexCheck -t < ../../Lexicon/2004/Allen.10.16.03/lexicon.modify > ../../Lexicon/2004/Allen.10.16.03/lexicon.fix

        At this point, lexionc.fix adds base to irreg.

      • Code change & recompile: CheckFormatxxxVariants: check grammar with irreg|base|...
      • Code Change & recompile: UpdatexxxVariants: not to add base to irreg|base|...
        Where xxx: Noun, Verb, Adj, Adv

        > $LEXBUILD/Tools/LexiconFix/LexCheck -t < ../../Lexicon/2004/Allen.10.16.03/lexicon.fix > ../../Lexicon/2004/Allen.10.16.03/lexicon.in

        At this point, lexionc.fix should be identical to lexicon.in

    • Final step to for generating lexicon.in:
      • Take out signature
      • Add extra field for feeding database

      > $LEXBUILD/Tools/LexiconFix/LexCheck -f < ../../Lexicon/2004/Allen.10.16.03/lexicon.fix > ../../Lexicon/2004/Allen.10.16.03/lexicon.in

    Table summarize

    Table NameNotes
    lexicon.mm.dd.yyOriginal lexicon file from Allen
    lexicon.modifymodified lexicon according to fix notes
    lexicon.fixfixed lexicon on irreg|base|...
    lexicon.ininput lexicon for lexBuild, take out signature, extra fields

  2. Prepare data files: inflVars.in
    > $LEXBUILD/Tools/LexiconFix/GenerateInfl ../../Lexicon/2004/Allen.10.16.03/lexicon.fix > ../../Lexicon/2004/Allen.10.16.03/inflVars.in

  3. Create and load tables into database
    • Copy input files into $LEXBUILD/data/DbTables/Tables/*.bak

      Table NameSource data fileFile Name
      USER$LEXBUILD/backup/10_17_03/user.bak.10_17_03_10:21user.bak
      LEX_RECORD$LEXBUILD/Lexicon/2004/Allen.mm.dd.yy/lexicon.inlexicon.bak
      LEX_RECORD_TEMPNonelexiconTemp.bak
      INFL_VARS$LEXBUILD/Lexicon/2004/Allen.mm.dd.yy/inflVars.ininflVars.bak
      INFL_VARS_TEMPNoneinflVarsTemp.bak
      NEW_TERMSNonenewTerms.bak
    • Create lexBuild data base in MySql (skip this if it exists)
      insert into db (Host, Db, User, Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv, Grant_priv, References_priv, Index_priv, Alter_priv) values ('localhost', 'lexBuild', 'lexBuild', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y');
      mysqladmin -u root -p create lexBuild
    • Create lexBuild username in MySql (skip this if it exits)
      insert into user (host, user, password) values ('%', 'lexBuild', password('lexBuild'));
    • Clean up lexBuild data base in MySql (skip this if no tables exists)
      > $LEXBUILD/Tools/LoadDb/deleteTables all
      > $LEXBUILD/Tools/LoadDb/dropTables all
    • Create tables: USER, LEX_RECORD, LEX_RECORD_TEMP, INFL_VARS, NEW_TERMS
      > $LEXBUILD/Tools/LoadDb/createTables all

  4. Deploy LexBuild from development lexlx1 to lexsrv1
    • > sftp lexsrv1
    • > put WebLexBuild.tgz

  5. Index and Load GSpell dictionary
    • Get latest inflVars
    • generate inFile.txt for GSpell
    • Create dictionary, LexiconLb
    • Refer to Close Match pages for details
    • The alternative is to copy directory of LexiconLb.

  6. Start up LexBuild Web Server
    • > cd /usr/local/bin
    • > tomcatStartup.sh