outfile.write(str(datetime.now())+"\t"+message+"\n")
#here
cwd             = os.path.dirname(os.path.realpath(__file__))
omegawiki       = "{cwd}/odwn/resources/wn-omegawiki-nld.txt".format(**locals())
wiktionary      = "{cwd}/odwn/resources/wn-wiktionary-nld.txt".format(**locals())
google          = "{cwd}/odwn/resources/wn-google-nld.txt".format(**locals())

#load it
log_it("starting")

instance = Wn_grid_parser(Wn_grid_parser.odwn)

log_it("start cleaning")

#clean it
instance.clean()

log_it('done cleaning')
#remove all babelnet + wiktionary + google_api results
for resource in ['babelnet','google_api','wiktionary']:
    log_it("removing %s" % resource)
    instance.les_remove_a_resource(resource)

#add results antoni + google monosemous results
def add_antoni():
    pos_dict = {'n':'noun','v':'verb'}
    for results in [omegawiki,wiktionary,google]:
        if results.endswith("omegawiki-nld.txt"):
            provenance = "omegawiki"
        elif results.endswith("wn-wiktionary-nld.txt"):
            provenance = "wiktionary"
Beispiel #2
0
#here
cwd = os.path.dirname(os.path.realpath(__file__))
omegawiki = "{cwd}/odwn/resources/wn-omegawiki-nld.txt".format(**locals())
wiktionary = "{cwd}/odwn/resources/wn-wiktionary-nld.txt".format(**locals())
google = "{cwd}/odwn/resources/wn-google-nld.txt".format(**locals())

#load it
log_it("starting")

instance = Wn_grid_parser(Wn_grid_parser.odwn)

log_it("start cleaning")

#clean it
instance.clean()

log_it('done cleaning')
#remove all babelnet + wiktionary + google_api results
for resource in ['babelnet', 'google_api', 'wiktionary']:
    log_it("removing %s" % resource)
    instance.les_remove_a_resource(resource)


#add results antoni + google monosemous results
def add_antoni():
    pos_dict = {'n': 'noun', 'v': 'verb'}
    for results in [omegawiki, wiktionary, google]:
        if results.endswith("omegawiki-nld.txt"):
            provenance = "omegawiki"
        elif results.endswith("wn-wiktionary-nld.txt"):