diff --git a/Networks.py b/Networks.py index 32daab1ac843b3d44e8461402138f9c5d8a941b0..eab5e49cb05253c11851fb7794402eb4caba8dc6 100644 --- a/Networks.py +++ b/Networks.py @@ -32,9 +32,9 @@ def loadW2v(w2vFile, weights, dicts, colname) : ################################################################################ def getNeededDicts(name) : names = ["FORM","UPOS"] - if "Lexicon" in name : + if "lexicon" in name.lower() : names.append("LEXICON") - if "NoLetters" not in name : + if "noletters" not in name.lower() : names.append("LETTER") return names @@ -56,6 +56,8 @@ def createNetwork(name, dicts, outputSizes, incremental, pretrained, hasBack) : return BaseNet(dicts, outputSizes, incremental, featureFunctionAll, historyNb, historyPopNb, suffixSize, prefixSize, columns, 3200, 128, pretrained, hasBack) elif name == "baseNoLetters" : return BaseNet(dicts, outputSizes, incremental, featureFunctionAll, historyNb, historyPopNb, 0, 0, columns, 1600, 64, pretrained, hasBack) + elif name == "lexiconNoLetters" : + return BaseNet(dicts, outputSizes, incremental, featureFunctionAll, historyNb, historyPopNb, 0, 0, ["UPOS", "LEXICON"], 1600, 64, pretrained, hasBack) elif name == "tagger" : return BaseNet(dicts, outputSizes, incremental, featureFunctionNostack, historyNb, historyPopNb, suffixSize, prefixSize, columns, 1600, 64, pretrained, hasBack) elif name == "taggerLexicon" :