mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
Remove unused 'preprocess' argument in Tok2Vec'
This commit is contained in:
parent
039d609362
commit
8f42f8d305
|
@ -226,7 +226,7 @@ def drop_layer(layer, factor=2.):
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
def Tok2Vec(width, embed_size, preprocess=True, pretrained_dims=0):
|
def Tok2Vec(width, embed_size, pretrained_dims=0):
|
||||||
cols = [ID, NORM, PREFIX, SUFFIX, SHAPE, ORTH]
|
cols = [ID, NORM, PREFIX, SUFFIX, SHAPE, ORTH]
|
||||||
with Model.define_operators({'>>': chain, '|': concatenate, '**': clone, '+': add}):
|
with Model.define_operators({'>>': chain, '|': concatenate, '**': clone, '+': add}):
|
||||||
norm = HashEmbed(width, embed_size, column=cols.index(NORM), name='embed_norm')
|
norm = HashEmbed(width, embed_size, column=cols.index(NORM), name='embed_norm')
|
||||||
|
@ -242,7 +242,7 @@ def Tok2Vec(width, embed_size, preprocess=True, pretrained_dims=0):
|
||||||
>> LN(Maxout(width, width*4, pieces=3)), column=5)
|
>> LN(Maxout(width, width*4, pieces=3)), column=5)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if pretrained_dims:
|
if pretrained_dims >= 1:
|
||||||
embed = concatenate_lists(trained_vectors, SpacyVectors)
|
embed = concatenate_lists(trained_vectors, SpacyVectors)
|
||||||
else:
|
else:
|
||||||
embed = trained_vectors
|
embed = trained_vectors
|
||||||
|
|
Loading…
Reference in New Issue
Block a user