def main(): #databaseFile="../data/inputFiles/geo_db_2c" #databaseFile="../data/inputFiles/5lines_geo_db" #databaseFile="data/geobase.dlog" #databaseFile="../am_dcs-1.0/domains/dbquery/geoquery/1/geobase.dlog" #databaseFile="../am_dcs-1.0/domains/dbquery/geoquery/1/geoquery.dlog" databaseFile="../am_dcs-1.0/domains/dbquery/general/predicates.dlog" #databaseFile="../dcs-1.0/domains/dbquery/geoquery/1/geoquery.dlog" #databaseFile="../dcs-1.0/domains/dbquery/general/predicates.dlog" #outputSynLexFile="../data/outputFiles/genPredSynLexicon.dlog" #outputLexFile="../am_dcs-1.0/lexiconFiles/geobaseBaseLexicon.dlog" #outputLexFile="../am_dcs-1.0/lexiconFiles/geoqueryBaseLexicon.dlog" #outputLexFile="data/geobaseWackyLexicon.dlog" #outputLexFile="../am_dcs-1.0/lexiconFiles/geobaseWackyLexicon.dlog" #outputLexFile="../am_dcs-1.0/lexiconFiles/geoqryWackyLexicon.dlog" #outputLexFile="../am_dcs-1.0/lexiconFiles/geopredWackyLexicon.dlog" #wackyVecOut="../am_dcs-1.0/lexiconFiles/wacky25geobaseTrigs" #wackyVecOut="../am_dcs-1.0/lexiconFiles/wacky25geoqryTrigs" wackyVecOut="../am_dcs-1.0/lexiconFiles/wacky25geopredsTrigs" distVector=wordVector.distVector() #predTriggers=getWackyPredTriggers(databaseFile, distVector) predTriggers=getWackyPredPredicateTriggers(databaseFile, distVector) #outputSynLexFile="../data/outputFiles/geobaseSynLexicon.dlog" #outputSynLexFile="../data/outputFiles/SynPredicateLexicon.dlog" #outputSynLexFile="../data/outputFiles/geoquerySynLexicon.dlog" #outputSynLexFile="../data/outputFiles/SynPredicateGeoBaseLexicon.dlog" #predTriggers=getPredicateTriggers(databaseFile) #synpredTriggers=getSynPredicateTriggers(databaseFile) #synpredTriggers=getPredPredicateTriggers(databaseFile) predArities=predArity.getAllPredArity() writeTrigsToFile(predTriggers,wackyVecOut)
def main(): #wackyTriggersFile="../am_dcs-1.0/lexiconFiles/wacky25geobaseTrigs" #baseOut="../am_dcs-1.0/lexiconFiles/LexOblation/geobaseLex/wackygeobaseLex" #baseOut="wackygeobaseLex" #wackyTriggersFile="../am_dcs-1.0/lexiconFiles/wacky25geoqryTrigs" #baseOut="../am_dcs-1.0/lexiconFiles/LexOblation/geoqryLex/wackygeoqryLex" wackyTriggersFile="../am_dcs-1.0/lexiconFiles/wacky25geopredsTrigs" baseOut="../am_dcs-1.0/lexiconFiles/LexOblation/predLex/wackygeopredLex" ext=".dlog" predArities=predArity.getAllPredArity() predTriggers=readTrigsFromFile(wackyTriggersFile) for i in range(1,13): outFile=baseOut+str(i)+ext createLexiconFile(predTriggers, i, outFile, predArities)