Skip to content

Commit fa53c50

Browse files
committed
CU-8699np02n Improve legacy conversion (3) (#30)
* CU-8699np02n: Update CDB legacy conversion so that it works with CDBs with no name_isupper attribute * CU-8699np02n: Add method to legacy converter to convert any config * CU-8699np02n: Fix config legacy conversion * CU-8699np02n: Add a few simple tests for Config legacy conversion * CU-8699np02n: Add a little more sophistication to general config conversion tests * CU-8699np02n: Simplify MetaCAT deserialisation from legacy data
1 parent 77e9c4d commit fa53c50

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

medcat-v2/medcat/components/addons/meta_cat/meta_cat.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,9 @@ def deserialise_from(cls, folder_path: str, **init_kwargs
180180
cnf = init_kwargs['cnf']
181181
else:
182182
config_path = os.path.join(folder_path, "meta_cat", "config")
183+
if not os.path.exists(config_path):
184+
# load legacy config (assuming it exists)
185+
config_path += ".dat"
183186
logger.info(
184187
"Was not provide a config when loading a meta cat from '%s'. "
185188
"Inferring config from file at '%s'", folder_path,

0 commit comments

Comments
 (0)