in genre/trie.py [0:0]
def get(self, indices, depth=0):
if len(indices) == 0 and depth == 0:
return self._codes["end_mention_token"]
elif len(indices) == 0 and depth == 1:
return self._codes["start_entity_token"]
elif len(indices) == 0:
return self._return_values
elif len(indices) == 1 and indices[0] == self._codes["end_entity_token"]:
return self._codes["EOS"]
else:
return self.get(indices[1:], depth=depth + 1)