Rust | Python | Node - Also add char_to_word

This commit is contained in:
Anthony MOI
2020-04-16 11:00:04 -04:00
parent 4aecd82d07
commit 71b7830d1b
5 changed files with 68 additions and 5 deletions

View File

@@ -131,6 +131,18 @@ class Encoding:
The index of the token that contains this char
"""
pass
def char_to_word(self, pos: int) -> Optional[int]:
"""
Get the word that contains the given char.
Args:
pos: int:
The position of a char in the input string
Returns:
The index of the word that contains this char
"""
pass
def pad(
self,
length: int,