Skip to content

Commit

Permalink
fix data utils docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhitingHu committed Sep 13, 2018
1 parent 9c699e8 commit 1fa6b4d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions texar/data/data_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ def read_words(filename, newline_token=None):
Args:
filename (str): Path to the file.
newline_token (str): The token to replace the original newline
token `\n`. For example, `newline_token=tx.data.SpecialTokens.EOS`.
newline_token (str, optional): The token to replace the original newline
token "\\\\n". For example,
`newline_token=tx.data.SpecialTokens.EOS`.
If `None`, no replacement is performed.
Returns:
Expand Down Expand Up @@ -193,8 +194,9 @@ def make_vocab(filenames, max_vocab_size=-1,
max_vocab_size (int): Maximum size of the vocabulary. Low frequency
words that exceeding the limit will be discarded.
Set to `-1` (default) if no truncation is wanted.
newline_token (str): The token to replace the original newline
token `\n`. For example, `newline_token=tx.data.SpecialTokens.EOS`.
newline_token (str, optional): The token to replace the original newline
token "\\\\n". For example,
`newline_token=tx.data.SpecialTokens.EOS`.
If `None`, no replacement is performed.
return_type (str): Either "list" or "dict". If "list" (default), this
function returns a list of words sorted by frequency. If "dict",
Expand Down

0 comments on commit 1fa6b4d

Please sign in to comment.