diff --git a/edsnlp/pipes/ner/adicap/adicap.py b/edsnlp/pipes/ner/adicap/adicap.py index 4fe376cd0..013f3bbfb 100644 --- a/edsnlp/pipes/ner/adicap/adicap.py +++ b/edsnlp/pipes/ner/adicap/adicap.py @@ -98,7 +98,7 @@ class AdicapMatcher(ContextualMatcher): ent.label_ # Out: adicap - ent._.adicap.model_dump() + ent._.adicap.dict() # Out: {'code': 'BHGS0040', # 'sampling_mode': 'BIOPSIE CHIRURGICALE', # 'technic': 'HISTOLOGIE ET CYTOLOGIE PAR INCLUSION', diff --git a/edsnlp/pipes/ner/tnm/model.py b/edsnlp/pipes/ner/tnm/model.py index 67215d8fd..206930976 100644 --- a/edsnlp/pipes/ner/tnm/model.py +++ b/edsnlp/pipes/ner/tnm/model.py @@ -197,3 +197,6 @@ def dict( d[k] = v.value return d + + if pydantic.VERSION < "2": + model_dump = pydantic.BaseModel.dict