Skip to content

Commit

Permalink
Fix swapped docstrings for str2ints and ints2str.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 229933393
  • Loading branch information
dbieber authored and Copybara-Service committed Jan 18, 2019
1 parent f8467b3 commit fb0b686
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tensorflow_datasets/core/features/text_feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ def vocab_size(self):
return self.encoder and self.encoder.vocab_size

def str2ints(self, str_value):
"""Conversion list[int] => decoded string."""
"""Conversion string => encoded list[int]."""
if not self._encoder:
raise ValueError(
"Text.str2ints is not available because encoder hasn't been defined.")
return self._encoder.encode(str_value)

def ints2str(self, int_values):
"""Conversion string => encoded list[int]."""
"""Conversion list[int] => decoded string."""
if not self._encoder:
raise ValueError(
"Text.ints2str is not available because encoder hasn't been defined.")
Expand Down

0 comments on commit fb0b686

Please sign in to comment.