From 785bc7f9653459fd144d09d79b13b3f03a0eae30 Mon Sep 17 00:00:00 2001 From: Taewoon Kim Date: Thu, 25 Apr 2024 14:28:35 +0900 Subject: [PATCH] remove redundant --- room_env/envs/room0.py | 3 --- room_env/utils.py | 13 ------------- 2 files changed, 16 deletions(-) diff --git a/room_env/envs/room0.py b/room_env/envs/room0.py index 3abf5bf..002044b 100644 --- a/room_env/envs/room0.py +++ b/room_env/envs/room0.py @@ -245,9 +245,6 @@ def renew(self) -> None: room = [] for head, relation, tail in self.room: name1, head = split_by_possessive(head) - # name2, tail = split_by_possessive(tail) - - # assert name1 == name2, "we don't do name mixing at this moment." if random.random() < self.probs["new_object"]: while True: diff --git a/room_env/utils.py b/room_env/utils.py index 2924f20..12c9ab7 100644 --- a/room_env/utils.py +++ b/room_env/utils.py @@ -157,19 +157,6 @@ def argmax(iterable) -> int: return max(enumerate(iterable), key=lambda x: x[1])[0] -def remove_posession(entity: str) -> str: - """Remove name from the entity. - - Args: - entity: e.g., bob's laptop - - Returns: - e.g., laptop - - """ - return entity.split("'s ")[-1] - - def split_by_possessive(name_entity: str) -> tuple[str, str]: """Separate name and entity from the given string.