Skip to content

Commit

Permalink
Title bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pushkar-Bhuse committed Aug 25, 2022
1 parent 1b77398 commit 3579096
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions forte/data/data_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1575,14 +1575,14 @@ def get( # type: ignore
def require_annotations(entry_class=Annotation) -> bool:
if self._data_store._is_subclass(entry_type_, entry_class):
return True
if self._data_store._is_subclass(entry_type_, Link):
link_class = as_entry_type(entry_type_)

curr_class: Type[EntryType] = as_entry_type(entry_type_)
if issubclass(curr_class, Link):
return issubclass(
link_class.ParentType, entry_class
) and issubclass(link_class.ChildType, entry_class)
if self._data_store._is_subclass(entry_type_, Group):
group_class = as_entry_type(entry_type_)
return issubclass(group_class.MemberType, entry_class)
curr_class.ParentType, entry_class
) and issubclass(curr_class.ChildType, entry_class)
if issubclass(curr_class, Group):
return issubclass(curr_class.MemberType, entry_class)
return False

# If we don't have any annotations but the items to check requires them,
Expand Down Expand Up @@ -2071,3 +2071,4 @@ def in_audio_span(self, inner_entry: Union[int, Entry], span: Span) -> bool:
# check here.
return False
return inner_begin >= span.begin and inner_end <= span.end

0 comments on commit 3579096

Please sign in to comment.