def insert_lexical_information(germanet_db, lex_files):
<EOL>germanet_db.lexunits.drop()<EOL>germanet_db.synsets.drop()<EOL>for lex_file in lex_files:<EOL><INDENT>synsets = read_lexical_file(lex_file)<EOL>for synset in synsets:<EOL><INDENT>synset = dict((SYNSET_KEY_REWRITES.get(key, key), value)<EOL>for (key, value) in synset.items())<EOL>lexunits = synset['<STR_LIT>']<EOL>synset['<STR_LIT>'] = germanet_db.lexunits.insert(lexunits)<EOL>synset_id = germanet_db.synsets.insert(synset)<EOL>for lexunit in lexunits:<EOL><INDENT>lexunit['<STR_LIT>']   = synset_id<EOL>lexunit['<STR_LIT>'] = synset['<STR_LIT>']<EOL>germanet_db.lexunits.save(lexunit)<EOL><DEDENT><DEDENT><DEDENT>germanet_db.synsets.create_index('<STR_LIT:id>')<EOL>germanet_db.lexunits.create_index('<STR_LIT:id>')<EOL>germanet_db.lexunits.create_index([('<STR_LIT>', DESCENDING)])<EOL>germanet_db.lexunits.create_index([('<STR_LIT>', DESCENDING),<EOL>('<STR_LIT>', DESCENDING)])<EOL>germanet_db.lexunits.create_index([('<STR_LIT>', DESCENDING),<EOL>('<STR_LIT>', DESCENDING),<EOL>('<STR_LIT>', DESCENDING)])<EOL>print('<STR_LIT>'.format(<EOL>germanet_db.synsets.count(),<EOL>germanet_db.lexunits.count()))<EOL>
Reads in the given lexical information files and inserts their
contents into the given MongoDB database.

Arguments:
- `germanet_db`: a pymongo.database.Database object
- `lex_files`: a list of paths to XML files containing lexial
  information