Comments (12)
Hey @nakumgaurav,
thanks for reporting the issue. I tried reproducing the issue, but the command runs successfully on my machine. Can you give more detail on your version of python, pexpect, opennlp and java?
@leonweber : Could you check, if you can reproduce the issue on mac? It seems to be an encoding related bug. I'm genuinely suprised to see the Bell character \x07
here.
from huner.
@nakumgaurav I have just pushed a commit that should fix this issue: https://github.com/hu-ner/huner/tree/docker_for_ner_scripts . Conversion is handled by the docker container and not the system python on that branch. Could you please verify that this fixes your issue? Then, I'll merge it into master.
from huner.
Hi, the bc2gm conversion works but I am facing an error in Biosemantics:
Converting Biosemantics 0%| | 2/4693 [00:00<36:18, 2.15it/s] Traceback (most recent call last): File "scripts/biosemantics_to_conll.py", line 35, in <module> tmp_sentences = sentence_splitter.split(text) File "/usr/ner_scripts/scripts/opennlp_wrapper.py", line 65, in split result, err = p.communicate(text.encode('utf-8')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 83: ordinal not in range(128) 0%| | 2/4693 [00:00<36:04, 2.17it/s] Traceback (most recent call last): File "scripts/biosemantics_to_conll.py", line 35, in <module> tmp_sentences = sentence_splitter.split(text) File "/usr/ner_scripts/scripts/opennlp_wrapper.py", line 65, in split result, err = p.communicate(text.encode('utf-8')) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 83: ordinal not in range(128)
Also to make Bioinfer work, I had to update the Dockerfile and add lxml since it resulted in the error "No module named lxml". See the new pull request
from huner.
Hi @leonweber, it seems lxml and tqdm are still missing from the Docker container. Could you please fix that?
Error on CDR data:
Traceback (most recent call last): File "scripts/cdr_to_conll.py", line 3, in <module> import extractors File "/usr/ner_scripts/scripts/extractors.py", line 2, in <module> from lxml import etree ImportError: No module named lxml
Additionally, I am not sure if we are running python3 in the image, since running the following command:
docker run -t -i huner/huner:dev /bin/bash -c "python --version"
yields
Python 2.7.17
EDIT: Yup, I think that's the issue. The use of python in convert_corpora.sh should be replaced by python3. I will run this on all datasets and let you know
from huner.
Hey @nakumgaurav. Could you please verify that you are on the latest commit of https://github.com/hu-ner/huner/tree/docker_for_ner_scripts? convert_corpora.sh
should only use python3 now.
from huner.
Hi @leonweber , yes I can now see the latest commit has python3. I am able to convert almost all datasets (still running a few). Also, for LocText could you maybe specify the directory structure in the downloads file. I think it requires all json files in the data/LocText directory, since I am facing this error on running covert_corpora.sh:
Converting Loctext 0%| | 0/2 [00:00<?, ?it/s] Traceback (most recent call last): File "scripts/loctext_gene_to_conll.py", line 27, in <module> with open(os.path.join(args.input_dir, file), 'r') as f_in: IsADirectoryError: [Errno 21] Is a directory: 'data/LocText/ann.json' 0%| | 0/2 [00:00<?, ?it/s] Traceback (most recent call last): File "scripts/loctext_gene_to_conll.py", line 27, in <module> with open(os.path.join(args.input_dir, file), 'r') as f_in: IsADirectoryError: [Errno 21] Is a directory: 'data/LocText/ann.json'
Thanks a lot for your constant help!
from huner.
Hi @nakumgaurav . I will check this on Monday, thanks for reporting!
from huner.
@nakumgaurav LocText can now be downloaded automatically again. Does that resolve the issue for you? And did you convert the other corpora successfully?
from huner.
Hi @leonweber, thanks a lot for fixing LocText. I am still having an issue with Variome disease conversion:
Disease 30%|████████████████████████████████████████████████▊ | 116/392 [00:54<02:20, 1.97it/s]Traceback (most recent call last): File "scripts/variome_to_conll.py", line 20, in <module> sentences, entities, document_ids = extractors.extract_from_biocreative(f_in, types, split_sentences=True) File "/usr/ner_scripts/scripts/extractors.py", line 69, in extract_from_biocreative assert annotated_entity == true_entity AssertionError 30%|████████████████████████████████████████████████▊ | 116/392 [00:54<02:10, 2.11it/s]
I have been able to convert all other datasets
from huner.
Hey @nakumgaurav ,
thanks for reporting. We didn't get to reproduce and debug the issue yet, but will look at it in the next days.
from huner.
Hey @nakumgaurav ,
the issue should be fixed in 850da3b. It resulted from incorrect annotations in Variome, annotating a lowercase "cancer" as the entity, while having an uppercase "Cancer" in the text.
Could you please verify this solves the issue? I'll merge the branches afterwards.
from huner.
Wonderful! I am now able to convert Variome disease. Many thanks for your constant help!
from huner.
Related Issues (20)
- Issue about CRAFT corpus. HOT 5
- Query regarding datasets HOT 2
- How to train a Huner model from scratch on other datasets? HOT 4
- Error converting many datasets HOT 1
- ?? symbols in annotations
- Path names in convert_craft.sh HOT 1
- Multiple Entity Types Predicted per Mention HOT 7
- Entity normalization HOT 1
- Program error HOT 5
- 'Model' object has no attribute 'id_to_word' HOT 4
- Local version? HOT 2
- Can't download biomedical abstracts of Huner
- How to make sure that there is no overlapping between train set, dev set and test set? HOT 4
- mix up with metrics on readme and in HUNER paper? HOT 2
- Craft to CoNLL error for conversion
- Request timeout for BioInfer dataset
- Inclusion of cell type information in Hunflair
- KeyError: 'OPENNLP' HOT 2
- Error in NER scripts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from huner.