File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -549,28 +549,3 @@ def __call__(self, doc: Doc) -> Doc:
549549def func_has_kwarg (func : Callable , keyword : str ):
550550 sig = inspect .signature (func )
551551 return keyword in sig .parameters
552-
553-
554- if __name__ == "__main__" :
555- import json
556- from copy import copy
557- from medcat .utils .ner .deid import DeIdModel
558-
559- mct_export = json .load (open ('/Users/k1897038/Downloads/MedCAT_Export_With_Text_2025-03-28_18_49_30.json' ))
560-
561- train_set = {'projects' : [copy (mct_export ['projects' ][0 ])]}
562- train_set ['projects' ][0 ]['documents' ] = mct_export ['projects' ][0 ]['documents' ][0 :8 ]
563-
564- test_set = {'projects' : [copy (mct_export ['projects' ][0 ])]}
565- test_set ['projects' ][0 ]['documents' ] = mct_export ['projects' ][0 ]['documents' ][8 :]
566-
567- json .dump (train_set , open ('train_set.json' , 'w' ))
568- json .dump (test_set , open ('test_set.json' , 'w' ))
569-
570- train_json_path = 'train_set.json'
571- test_json_path = 'test_set.json'
572- deid_model_path = '/Users/k1897038/Documents/cogstack_docs/medcat_models/medcat_deid_model_691c3f6a6e5400e7.zip'
573- deid_cat = DeIdModel .load_model_pack (deid_model_path )
574- deid_cat .train (ignore_extra_labels = True , train_json_path = train_json_path , test_json_path = test_json_path )
575-
576-
You can’t perform that action at this time.
0 commit comments