Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
srush committed Aug 21, 2015
1 parent 41320c3 commit 19f190d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/BatchLoaderUnk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function BatchLoaderUnk.text_to_tensor(input_files, morpho_file, use_morpho,
local split_counts = {}
local morpho_dict = {}

if false and use_morpho then
if use_morpho then
f = io.open(morpho_file, 'r')
for line in f:lines() do
local n = 1
Expand Down Expand Up @@ -245,7 +245,7 @@ function BatchLoaderUnk.text_to_tensor(input_files, morpho_file, use_morpho,
end
output_tensors[split][word_num] = word2idx[word]
if use_morpho then
if true or morpho_dict[word2idx[word]] == nil then
if morpho_dict[word2idx[word]] == nil then
-- Just embed word.
output_morphos[split][word_num] = torch.ones(max_factor_l)
if factor2idx[word] == nil then
Expand Down

0 comments on commit 19f190d

Please sign in to comment.