Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code couldn't run #275

Open
albert-ying opened this issue Nov 9, 2022 · 6 comments
Open

Example code couldn't run #275

albert-ying opened this issue Nov 9, 2022 · 6 comments

Comments

@albert-ying
Copy link

Got import error at begining

@albert-ying
Copy link
Author

And also got bunch of undefined error at p_53 function.

image

@albert-ying
Copy link
Author

I think you may forgot to push something when updating the release

@dmalzl
Copy link

dmalzl commented Nov 25, 2023

I had a similar problem and I think this is because the download links to the SPECIALIST lexicon are outdated
I think it should work if you update the urls in the lex_file_to_url.json to something like this https://data.lhncbc.nlm.nih.gov/public/lsg/lexicon/2023/release/LEX_DOC/*
see here for other versions

@dmalzl
Copy link

dmalzl commented Nov 25, 2023

Okay sorry this is not the reason but yet another issue. These things should actually be in the map_sra_to_ontology module but seem to not be imported correctly

@dmalzl
Copy link

dmalzl commented Nov 25, 2023

okay so most of what is needed is in the map_sra_to_ontology/pipeline_components.py file. So you need to import everything from this as well as import SpecialistLexicon from map_sra_to_ontology/load_specialist_lex.py. Additionally you might also need to run:

import nltk
nltk.download('punkt')

to download the tokenizer data for nltk

@dmalzl
Copy link

dmalzl commented Nov 25, 2023

you can also checkout the run_pipeline.py file from my fork of the repo here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants