Skip to content

Commit

Permalink
Fixed filtering of unk from transcript
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanNaren committed Apr 26, 2017
1 parent bfab1c3 commit 4537c2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __getitem__(self, index):
def parse_transcript(self, transcript_path):
with open(transcript_path, 'r') as transcript_file:
transcript = transcript_file.read().replace('\n', '')
transcript = [self.labels_map.get(x, None) for x in list(transcript) if x is not None]
transcript = filter(None, [self.labels_map.get(x) for x in list(transcript)])
return transcript

def __len__(self):
Expand Down

0 comments on commit 4537c2a

Please sign in to comment.