Skip to content

Commit

Permalink
change extractFeatures to extract_features
Browse files Browse the repository at this point in the history
  • Loading branch information
bpopeters committed Sep 2, 2017
1 parent d556116 commit e94cda9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions onmt/IO.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __setstate__(self, state):
torchtext.vocab.Vocab.__setstate__ = __setstate__


def extractFeatures(tokens):
def extract_features(tokens):
"Given a list of token separate out words and features (if any)."

split_tokens = [token.split(u"│") for token in tokens]
Expand Down Expand Up @@ -188,7 +188,7 @@ def read_corpus_file(self, path, truncate):
lines = (line.split() for line in corpus_file)
if truncate:
lines = (line[:truncate] for line in lines)
return [extractFeatures(line) for line in lines]
return [extract_features(line) for line in lines]

def construct_examples(self, lines, side):
assert side in ["src", "tgt"]
Expand Down

0 comments on commit e94cda9

Please sign in to comment.