From cfb958391f27bc3ccbcfc38c9f2181928d1f9f56 Mon Sep 17 00:00:00 2001 From: rafelafrance Date: Wed, 17 Apr 2024 15:08:14 -0400 Subject: [PATCH] Remove trait name as a requirement --- traiter/pylib/pipes/trait.py | 2 +- traiter/pylib/rules/habitat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/traiter/pylib/pipes/trait.py b/traiter/pylib/pipes/trait.py index cd04b090..b374e63f 100644 --- a/traiter/pylib/pipes/trait.py +++ b/traiter/pylib/pipes/trait.py @@ -120,7 +120,7 @@ def relabel_ent(self, ent, old_label): if new_label: relabel_entity(ent, new_label) label = new_label - ent._.trait.trait = new_label + ent._.trait._trait = new_label return label diff --git a/traiter/pylib/rules/habitat.py b/traiter/pylib/rules/habitat.py index 89e005cf..d97c9a59 100644 --- a/traiter/pylib/rules/habitat.py +++ b/traiter/pylib/rules/habitat.py @@ -103,7 +103,7 @@ def labeled_match(cls, ent): break habitat = " ".join(ent[i:].text.split()) trait = super().from_ent(ent, habitat=habitat) - trait.trait = "habitat" + trait._trait = "habitat" return trait