Exemplo n.º 1
0
def registerOpts(program_args):
    if program_args.lex is not None:
        mwe_lexicons.load_lexicons(program_args.lex)
    if program_args.clist is not None:
        #mwe_lexicons.load_combined_lexicon('mwetoolkit YelpAcademic', [f for f in program_args.clist if f.name.startswith('mwetk.yelpAcademic')], is_list=True)
        #mwe_lexicons.load_lexicons([f for f in program_args.clist if not f.name.startswith('mwetk.yelpAcademic')], is_list=True)
        mwe_lexicons.load_lexicons(program_args.clist, is_list=True)
    if program_args.clusters:
        loadClusters(program_args.cluster_file)
    global useTokenBigrams, useWNOOV, useWNCompound
    useTokenBigrams = not program_args.no_bigrams
    useWNOOV = not program_args.no_oov
    useWNCompound = not program_args.no_compound
Exemplo n.º 2
0
def registerOpts(program_args):
    if program_args.lex is not None:
        mwe_lexicons.load_lexicons(program_args.lex)
    if program_args.clist is not None:
        #mwe_lexicons.load_combined_lexicon('mwetoolkit YelpAcademic', [f for f in program_args.clist if f.name.startswith('mwetk.yelpAcademic')], is_list=True)
        #mwe_lexicons.load_lexicons([f for f in program_args.clist if not f.name.startswith('mwetk.yelpAcademic')], is_list=True)
        mwe_lexicons.load_lexicons(program_args.clist, is_list=True)
    if program_args.clusters:
        loadClusters(program_args.cluster_file)
    global useTokenBigrams, useWNOOV, useWNCompound
    useTokenBigrams = not program_args.no_bigrams
    useWNOOV = not program_args.no_oov
    useWNCompound = not program_args.no_compound