MurtyShikhar / Hierarchical-Typing

Code and Data for all experiments from our ACL 2018 paper "Hierarchical Losses and New Resources for Fine-grained Entity Typing and Linking"
43 stars 10 forks source link

how to run step by step #1

Open SeekPoint opened 5 years ago

SeekPoint commented 5 years ago

by the way, ub16hp@UB16HP:~/ub16_prj/Hierarchical-Typing/src$ python3 build_data.py Traceback (most recent call last): File "build_data.py", line 309, in config_obj = Config(run_dir, "AIDA", "entity_linker_order") TypeError: init() takes 3 positional arguments but 4 were given ub16hp@UB16HP:~/ub16_prj/Hierarchical-Typing/src$

izuna385 commented 5 years ago

I came across same error. In config.py, there are

` def init(self, run_dir, args):

    self.struct_weight = args.struct_weight
    self.dropout = args.dropout
    self.dataset = args.dataset
    self.encoder = args.encoder
    ...

` so, for runnning built_data.py, specifing all the parameters included in args is needed?

MurtyShikhar commented 5 years ago

Hi, build_data.py doesn't need to be run. All the data is provided in the google drive link (in the README).

izuna385 commented 5 years ago

Thanks! I checked code, and setting base_dir="./dataset_dir". (and re-wrote some absolute path in code to relative path) So, the Directory structure is like this.

image

When setting dataset="typenet" and running deploy.py, it seems go well, so I'll going to run code. Thank you very much for your prompt response.

And also, I'm sorry for still troubling you, but is there any code for preprocessing umls database? Because, when I set dataset="umls" and ran code, but FileNotFoundError: [Errno 2] No such file or directory: './dataset_dir/meta_data_processed/entities.joblib'

Do you know how to run deploy.py for umls and Medmentions? Or, MIL_data contains something for Medmentions? (I still don't know what MIL stands for...)

izuna385 commented 5 years ago

I'm sorry to bother you over and over. I find that to run deploy_linler.py for umls, preprocessed data of umls and Medmentions is needed to create

train_lines = joblib.load("meta_data_processed/meta_train.joblib")
dev_lines   = joblib.load("meta_data_processed/meta_dev.joblib")
test_lines  = joblib.load("meta_data_processed/meta_test.joblib")

And also I try to find code for coreting these data in this repository and Medmentions' one, but I couldn't. Is there any code for making preprocessing datas(i.e. meta_train.joblib,meta_dev.joblib,meta_test.joblib ) for Medmentions linkers?

MurtyShikhar commented 5 years ago

Hi, yes, this is available as well. I'll add it to the google drive soon!

izuna385 commented 5 years ago

Thank you so much. I'll check it out later. None of the above are time critical, I'd appreciate if you can add them to drive when you have time.