Skip to content

Commit

Permalink
Merge pull request #3387 from flairNLP/multi_entity_hunflair
Browse files Browse the repository at this point in the history
Added support for biomedical datasets with multiple entity types
  • Loading branch information
alanakbik authored Feb 12, 2024
2 parents 17e2895 + 8e9eeb9 commit d55c0e9
Show file tree
Hide file tree
Showing 6 changed files with 1,150 additions and 405 deletions.
8 changes: 4 additions & 4 deletions flair/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1787,10 +1787,10 @@ def __init__(

def __str__(self) -> str:
output = (
f"MultiCorpus: " # type: ignore[arg-type]
f"{len(self.train) if self.train else 0} train + "
f"{len(self.dev) if self.dev else 0} dev + "
f"{len(self.test) if self.test else 0} test sentences\n - "
f"MultiCorpus: "
f"{_len_dataset(self.train) if self.train else 0} train + "
f"{_len_dataset(self.dev) if self.dev else 0} dev + "
f"{_len_dataset(self.test) if self.test else 0} test sentences\n - "
)
output += "\n - ".join([f"{type(corpus).__name__} {corpus!s} - {corpus.name}" for corpus in self.corpora])
return output
Expand Down
Loading

0 comments on commit d55c0e9

Please sign in to comment.