Skip to content
Snippets Groups Projects
Commit 2d6902d9 authored by Franck Dary's avatar Franck Dary
Browse files

Added network type LexiconNoLetters

parent 8565bf2d
No related branches found
No related tags found
No related merge requests found
...@@ -32,9 +32,9 @@ def loadW2v(w2vFile, weights, dicts, colname) : ...@@ -32,9 +32,9 @@ def loadW2v(w2vFile, weights, dicts, colname) :
################################################################################ ################################################################################
def getNeededDicts(name) : def getNeededDicts(name) :
names = ["FORM","UPOS"] names = ["FORM","UPOS"]
if "Lexicon" in name : if "lexicon" in name.lower() :
names.append("LEXICON") names.append("LEXICON")
if "NoLetters" not in name : if "noletters" not in name.lower() :
names.append("LETTER") names.append("LETTER")
return names return names
...@@ -56,6 +56,8 @@ def createNetwork(name, dicts, outputSizes, incremental, pretrained, hasBack) : ...@@ -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) return BaseNet(dicts, outputSizes, incremental, featureFunctionAll, historyNb, historyPopNb, suffixSize, prefixSize, columns, 3200, 128, pretrained, hasBack)
elif name == "baseNoLetters" : elif name == "baseNoLetters" :
return BaseNet(dicts, outputSizes, incremental, featureFunctionAll, historyNb, historyPopNb, 0, 0, columns, 1600, 64, pretrained, hasBack) 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" : elif name == "tagger" :
return BaseNet(dicts, outputSizes, incremental, featureFunctionNostack, historyNb, historyPopNb, suffixSize, prefixSize, columns, 1600, 64, pretrained, hasBack) return BaseNet(dicts, outputSizes, incremental, featureFunctionNostack, historyNb, historyPopNb, suffixSize, prefixSize, columns, 1600, 64, pretrained, hasBack)
elif name == "taggerLexicon" : elif name == "taggerLexicon" :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment