Skip to content

Commit

Permalink
Repair negation
Browse files Browse the repository at this point in the history
  • Loading branch information
caufieldjh committed Oct 3, 2023
1 parent 37e2d6c commit 7b38c39
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ontogpt/evaluation/ctd/eval_ctd.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
ChemicalToDiseaseRelationship,
Publication,
TextWithTriples,
Triple,
)

THIS_DIR = Path(__file__).parent
Expand All @@ -50,8 +49,11 @@
logger = logging.getLogger(__name__)


def negated(Triple) -> bool:
return Triple.qualifier and Triple.qualifier.lower() == "not"
def negated(ChemicalToDiseaseRelationship) -> bool:
return (
ChemicalToDiseaseRelationship.qualifier
and ChemicalToDiseaseRelationship.qualifier.lower() == "not"
)


class PredictionRE(BaseModel):
Expand Down

0 comments on commit 7b38c39

Please sign in to comment.