BERN2: an advanced neural biomedical namedentity recognition and normalization tool

Overview

BERN2

We present BERN2 (Advanced Biomedical Entity Recognition and Normalization), a tool that improves the previous neural network-based NER tool by employing a multi-task NER model and neural network-based NEN models to achieve much faster and more accurate inference. This repository provides a way to host your own BERN2 server. See our paper for more details.

***** Try BERN2 at http://bern2.korea.ac.kr *****

Installing BERN2

You first need to install BERN2 and its dependencies.

# Install torch with conda (please check your CUDA version)
conda create -n bern2 python=3.7
conda activate bern2
conda install pytorch==1.9.0 cudatoolkit=10.2 -c pytorch
conda install faiss-gpu libfaiss-avx2 -c conda-forge

# Check if cuda is available
python -c "import torch;print(torch.cuda.is_available())"

# Install BERN2
git clone [email protected]:dmis-lab/BERN2.git
cd BERN2
pip install -r requirements.txt

(Optional) If you want to use mongodb as a caching database, you need to install and run it.

# https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition-using-deb-packages
sudo systemctl start mongod
sudo systemctl status mongod

Then, you need to download resources (e.g., external modules or dictionaries) for running BERN2. Note that you will need 70GB of free disk space.

wget http://nlp.dmis.korea.edu/projects/bern2/resources.tar.gz
tar -zxvf resources.tar.gz
rm -rf resources.tar.gz
# install CRF
cd resources/GNormPlusJava/CRF
./configure --prefix="$HOME"
make
make install
cd ../../..

Running BERN2

The following command runs BERN2.

export CUDA_VISIBLE_DEVICES=0
cd scripts
bash run_bern2.sh

(Optional) To restart BERN2, you need to run the following commands.

export CUDA_VISIBLE_DEVICES=0
cd scripts
bash stop_bern2.sh
bash start_bern2.sh

Annotations

Click here to download the annotations (NER and normalization) for 25.7+ millions of PubMed articles (From pubmed21n0001 to pubmed21n1057 (2021.01.12)) (Compressed, 18 GB).

The data provided by BERN2 is post-processed and may differ from the most current/accurate data available from U.S. National Library of Medicine (NLM).

Citation

@article{sung2022bern2,
    title={BERN2: an advanced neural biomedical namedentity recognition and normalization tool}, 
    author={Sung, Mujeen and Jeong, Minbyul and Choi, Yonghwa and Kim, Donghyeon and Lee, Jinhyuk and Kang, Jaewoo},
    year={2022},
    eprint={2201.02080},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}

Contact Information

For help or issues using BERN2, please submit a GitHub issue. Please contact Mujeen Sung (mujeensung (at) korea.ac.kr), or Minbyul Jeong (minbyuljeong (at) korea.ac.kr) for communication related to BERN2.

Comments
  • FileNotFoundError: [Errno 2] for local server POST

    FileNotFoundError: [Errno 2] for local server POST

    Hello. I installed BERN2 in my VM (Ubuntu 18.04 x64, 1 GPU). It succesfully installed, however, if I run example post script on READAME.md, then the below error occured. (Server console log)

    [23/Mar/2022 06:02:40.831728] [550f7242b14dc039a8a5ee6aa9233f3472dd7b4a33484f5955175a4d] GNormPlus 0.0001380443572998047 sec
    Traceback (most recent call last):
      File "/home/vessl/BERN2/bern2/bern2.py", line 106, in annotate_text
        output = self.tag_entities(text, base_name)
      File "/home/vessl/BERN2/bern2/bern2.py", line 358, in tag_entities
        async_result = loop.run_until_complete(self.async_ner(arguments_for_coroutines))
      File "/home/vessl/miniconda3/envs/bern2/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
        return future.result()
      File "/home/vessl/BERN2/bern2/bern2.py", line 491, in async_ner
        result = await asyncio.gather(*coroutines)
      File "/home/vessl/BERN2/bern2/bern2.py", line 533, in _ner_wrap
        with open(output_mtner, 'r', encoding='utf-8') as f:
    FileNotFoundError: [Errno 2] No such file or directory: './multi_ner/output/550f7242b14dc039a8a5ee6aa9233f3472dd7b4a33484f5955175a4d.PubTator.json'
    
    [2022-03-23 06:02:41,425] ERROR in app: Exception on /plain [POST]
    Traceback (most recent call last):
      File "/home/vessl/miniconda3/envs/bern2/lib/python3.7/site-packages/flask/app.py", line 2073, in wsgi_app
        response = self.full_dispatch_request()
      File "/home/vessl/miniconda3/envs/bern2/lib/python3.7/site-packages/flask/app.py", line 1518, in full_dispatch_request
        rv = self.handle_user_exception(e)
      File "/home/vessl/miniconda3/envs/bern2/lib/python3.7/site-packages/flask/app.py", line 1516, in full_dispatch_request
        rv = self.dispatch_request()
      File "/home/vessl/miniconda3/envs/bern2/lib/python3.7/site-packages/flask/app.py", line 1502, in dispatch_request
        return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
      File "/home/vessl/BERN2/app/__init__.py", line 85, in plain_api
        return Response(json.dumps({"error_message": result_dict["error_message"]}), status=404, content_type='application/json')
    NameError: name 'Response' is not defined
    127.0.0.1 - - [23/Mar/2022 06:02:41] "POST /plain HTTP/1.1" 500 -
    

    nohup_multi_ner.out log

    MTNER init_t 28.547 sec.
    1it [00:00, 185.89it/s]
    Prediction: 100%|██████████| 1/1 [00:00<00:00,  2.28it/s]
    Traceback (most recent call last):
      File "multi_ner/ner_server.py", line 91, in <module>
        run_server(mt_ner, args)
      File "multi_ner/ner_server.py", line 63, in run_server
        mtner_recognize(model, dict_path, base_name, args)
      File "multi_ner/ner_server.py", line 47, in mtner_recognize
        with open(output_mt_ner, 'w', encoding='utf-8') as f:
    PermissionError: [Errno 13] Permission denied: 'multi_ner/output/550f7242b14dc039a8a5ee6aa9233f3472dd7b4a33484f5955175a4d.PubTator.json'
    

    Thank you.

    opened by starmpcc 23
  • Files are duplicated with same PMID

    Files are duplicated with same PMID

    There are major issues in the data. Many files were just duplicates of one PMID's labelling. Is this intentional? I list the files of problem, and the pmid that it is filled up with in a table, following up with an example image of the issue. Look forward to your feedback.

    | file # of problem 21n0XXX | file is filled up with only |
    |---|---| | 713, 714, 715, 716, 717, 718, 719 | pmid: 22137675 | | 740, 741, 742 | pmid: 23065850 | | 748, 749 | pmid: 23334882 | | 758, 759 | pmid: 23630654 | | 766, 767 | pmid: 23886943 | | 779, 780, 781, 782 | pmid: 24335088 | | 788, 789, 790, 791 | pmid: 24595986 | | 813, 812, 811, 810 | pmid: 25329600 |

    example image (21n0713.json) MicrosoftTeams-image

    opened by ksj20 9
  • Bern2 local deployment can't query a PMID

    Bern2 local deployment can't query a PMID

    Hello! I was testing the local deployment of Bern2 and it seems to work fine when submitting plain text. With PMID I get the following error:

    Traceback (most recent call last): File "", line 1, in File "", line 2, in query_pmid File "/Users/franciscos/opt/anaconda3/lib/python3.8/site-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/Users/franciscos/opt/anaconda3/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/Users/franciscos/opt/anaconda3/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/Users/franciscos/opt/anaconda3/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

    Any idea how I can fix this? Thanks in advance and thanks for building such a nice tool

    opened by FCoroado 8
  • Annotation download ERR_EMPTY_RESPONSE

    Annotation download ERR_EMPTY_RESPONSE

    Hi,

    First of all, thanks for the great work!

    I tried to download the pre-processed PubMed annotations, but got a server error: ERR_EMPTY_RESPONSE. Is there any other way to download the data?

    opened by mbiemans 8
  • I am running into same issue as @yuetieqi-meow

    I am running into same issue as @yuetieqi-meow

        I am running into same issue as @yuetieqi-meow 
    

    No issue encountered in installation, and when I ran the test, in the nohup_bern2.out: `[01/Oct/2022 17:54:12.841469] id: 9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2 [Errno 111] Connection refused [01/Oct/2022 17:54:12.899379] [9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2] GNormPlus 0.0003619194030761719 sec [01/Oct/2022 17:54:13.614587] [9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2] tmVar 2.0 0.7597899436950684 sec [01/Oct/2022 17:54:13.801885] [9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2] Multi-task NER 0.9021279811859131 sec, #entities: 2 Traceback (most recent call last): File "/home/kun/anaconda3/envs/bern2/lib/python3.7/shutil.py", line 566, in move os.rename(src, real_dst) FileNotFoundError: [Errno 2] No such file or directory: './resources/GNormPlusJava/output/9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2.PubTator' -> './resources/tmVarJava/input/9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2.PubTator.PubTator.Gene'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last): File "/media/kun/Storage/BERN2/bern2/bern2.py", line 107, in annotate_text output = self.tag_entities(text, base_name) File "/media/kun/Storage/BERN2/bern2/bern2.py", line 376, in tag_entities shutil.move(output_gnormplus, input_tmvar_gene) File "/home/kun/anaconda3/envs/bern2/lib/python3.7/shutil.py", line 580, in move copy_function(src, real_dst) File "/home/kun/anaconda3/envs/bern2/lib/python3.7/shutil.py", line 266, in copy2 copyfile(src, dst, follow_symlinks=follow_symlinks) File "/home/kun/anaconda3/envs/bern2/lib/python3.7/shutil.py", line 120, in copyfile with open(src, 'rb') as fsrc: FileNotFoundError: [Errno 2] No such file or directory: './resources/GNormPlusJava/output/9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2.PubTator'`

    No other issues found on other log files: nohup_disease_normalize.out: Sieve loading .. 2628 ms, Ready nohup_gene_normalize.out: Ready (port 18888) nohup_gnormplus.out: Starting GNormPlus Service at 127.0.1.1:18895 Loading Gene Dictionary : Processing ... Loading Gene Dictionary : Processing Time:9.951sec Ready nohup_multi_ner.out: `MTNER init_t 13.013 sec.

    0it [00:00, ?it/s] 1it [00:00, 34.71it/s]

    Prediction: 0%| | 0/1 [00:00<?, ?it/s] Prediction: 100%|██████████| 1/1 [00:00<00:00, 1.37it/s] Prediction: 100%|██████████| 1/1 [00:00<00:00, 1.37it/s]nohup_tmvar.out:Starting tmVar 2.0 Service at 127.0.1.1:18896 Reading POS tagger model from lib/taggers/english-left3words-distsim.tagger ... done [1.5 sec]. Loading tmVar : Processing Time:1.739sec Ready input/9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2.PubTator - (PubTator format) : Processing Time:0.521sec ner success = 9f85ebe7f122e750ca113ce20ef88f448960721e701cd1cc3e1650e2.PubTator`

    I noticed when I ran the test case, the nohup_bern2.out nohup_multi_ner.out and nohup_tmvar.out logs are updated, but nohup_gnormplus.out is not (the other two normalize.out log files are not, and I assume because they are not executed because NER encounters error). This sounds like GNormPlus not executed at all? Any ideas on this?

    Originally posted by @kunlu-ou in https://github.com/dmis-lab/BERN2/issues/24#issuecomment-1264506002

    opened by kunlu-ou 7
  • Troubles running locally, FileNotFoundError

    Troubles running locally, FileNotFoundError

    I'm trying to run locally and following the steps described in README, I get this

    [21/Jan/2022 11:56:35.780036] id: 7bb79cf620bd0ba345504784f5aaa6ad48394bcd1cf10b7e29964e05
    [21/Jan/2022 11:56:36.632464] [7bb79cf620bd0ba345504784f5aaa6ad48394bcd1cf10b7e29964e05] tmVar 2.0 0.8203573226928711 sec
    [21/Jan/2022 11:56:38.605409] [7bb79cf620bd0ba345504784f5aaa6ad48394bcd1cf10b7e29964e05] GNormPlus 2.742703914642334 sec
    Traceback (most recent call last):
      File "/Users/dima/code/BERN2/bern2/bern2.py", line 105, in annotate_text
        output = self.tag_entities(text, base_name)
      File "/Users/dima/code/BERN2/bern2/bern2.py", line 290, in tag_entities
        async_result = loop.run_until_complete(self.async_ner(arguments_for_coroutines))
      File "/Users/dima/opt/anaconda3/envs/bern2/lib/python3.7/asyncio/base_events.py", line 587, in run_until_complete
        return future.result()
      File "/Users/dima/code/BERN2/bern2/bern2.py", line 417, in async_ner
        result = await asyncio.gather(*coroutines)
      File "/Users/dima/code/BERN2/bern2/bern2.py", line 459, in _ner_wrap
        with open(output_mtner, 'r', encoding='utf-8') as f:
    FileNotFoundError: [Errno 2] No such file or directory: './multi_ner/output/7bb79cf620bd0ba345504784f5aaa6ad48394bcd1cf10b7e29964e05.PubTator.json'
    

    The only thing I've changed is removing transferring models to cuda, since I don't have GPU on my current machine.

    opened by dmytrobabych 7
  • Use preferred bioregistry prefixes for normalized entity identifiers

    Use preferred bioregistry prefixes for normalized entity identifiers

    Great to see that BERN2 normalizes entities to compact identifiers in resource:identifier format. I noticed that there is an opportunity to standardize the prefixes used with Bioregistry:

    • NCBITaxon prefix as per http://bioregistry.io/registry/ncbitaxon
    • NCBIGene prefix as per http://bioregistry.io/registry/ncbigene

    FYI I didn't check all the entity types BERN2 is capable of tagging for whether they use the preferred prefix.

    @cthoyt might also be helpful here.

    opened by dhimmel 7
  • FileNotFoundError: [Errno 2]

    FileNotFoundError: [Errno 2]

    Hello, I posted my error a few days ago in this and I retried a few times these days. I found it's really hard for me to fix it because all logs except nohup_bern2.out goes well. Here is my lastest nohup_bern2.out:

    [08/May/2022 19:28:51.930673] id: 1c3d05e08ffc1ca51c537406a8e2342fd5c546912049d73bd31e0427
    [Errno 111] Connection refused
    [08/May/2022 19:28:52.126999] [1c3d05e08ffc1ca51c537406a8e2342fd5c546912049d73bd31e0427] GNormPlus 0.0005352497100830078 sec
    [08/May/2022 19:29:07.017467] [1c3d05e08ffc1ca51c537406a8e2342fd5c546912049d73bd31e0427] Multi-task NER 14.890285730361938 sec, #entities: 2
    [08/May/2022 19:29:26.444897] [1c3d05e08ffc1ca51c537406a8e2342fd5c546912049d73bd31e0427] tmVar 2.0 34.42515420913696 sec
    Traceback (most recent call last):
      File "/home/scholar1/anaconda3/envs/bern2/lib/python3.7/shutil.py", line 566, in move
        os.rename(src, real_dst)
    FileNotFoundError: [Errno 2] No such file or directory: './resources/GNormPlusJava/output/1c3d05e08ffc1ca51c537406a8e2342fd5c546912049d73bd31e0427.PubTator' -> './resources/tmVarJava/input/1c3d05e08ffc1ca51c537406a8e2342fd5c546912049d73bd31e0427.PubTator.PubTator.Gene'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/scholar1/bern2/BERN2/bern2/bern2.py", line 106, in annotate_text
        output = self.tag_entities(text, base_name)
      File "/home/scholar1/bern2/BERN2/bern2/bern2.py", line 371, in tag_entities
        shutil.move(output_gnormplus, input_tmvar_gene)
      File "/home/scholar1/anaconda3/envs/bern2/lib/python3.7/shutil.py", line 580, in move
        copy_function(src, real_dst)
      File "/home/scholar1/anaconda3/envs/bern2/lib/python3.7/shutil.py", line 266, in copy2
        copyfile(src, dst, follow_symlinks=follow_symlinks)
      File "/home/scholar1/anaconda3/envs/bern2/lib/python3.7/shutil.py", line 120, in copyfile
        with open(src, 'rb') as fsrc:
    FileNotFoundError: [Errno 2] No such file or directory: './resources/GNormPlusJava/output/1c3d05e08ffc1ca51c537406a8e2342fd5c546912049d73bd31e0427.PubTator'
    
    127.0.0.1 - - [08/May/2022 19:29:27] "POST /plain HTTP/1.1" 404 -
    

    and all other 5 logs just similar as I posted here

    Thank you!

    opened by yuetieqi-meow 6
  • Errors while extracting resource-file

    Errors while extracting resource-file

    Hi:

    Thank you very much for sharing your excellent work. While trying to extract the resource file, I ran into this error. Any suggestions as to the cause(s)?

    tar -zxvf resources_v1.1.b.tar.gz . .

    resources/tmVarJava/Database/var2rs_Xm.db resources/tmVarJava/Database/gene2rs.db tar: Skipping to next header tar: A lone zero block at 22871798 tar: Exiting with failure status due to previous errors .

    Regards,

    Bancherd

    opened by Bancherd-DeLong 5
  • Syntax Error in server.py Causes BERN2 Local Installation to Not Work

    Syntax Error in server.py Causes BERN2 Local Installation to Not Work

    Hi @minstar & @mjeensung , I have attempted to install BERN2 locally, but I get the following error when I launch it:

    Traceback (most recent call last):
      File "server.py", line 1, in <module>
        from app import create_app
      File "/Users/[myuser]/BERN2/app/__init__.py", line 129
        return render_template('result_text.html', result_items=res_items, latency = f'{latency*1000:9.2f}', result_str=json.dumps(result_dict, sort_keys=True, indent=4))
    

    I have also seen that this error appears to keep server.py from running as it is not running when I run bash stop_bern2.sh. I get the following output

    No ner_server.py found to stop.
    Stopped GNormPlusServer.main.jar
    Stopped tmVar2Server.main.jar
    Stopped disease_normalizer_21.jar
    Stopped gnormplus-normalization_21.jar
    No server.py found to stop.
    

    Finally, I still tried to submit the plain text and PMID examples listed under the local instillation instructions and I simply get no output even after waiting for several minutes. My thought process leads me to believe that the error in server.py is causing BERN2 to simply terminate and hence no outputs from the tutorial text and PMIDS.

    Thanks for your help! Let me know if I can help with any additional files or insight.

    Andrew

    opened by compbiolover 5
  • How to improve named entity normalization for human proteins?

    How to improve named entity normalization for human proteins?

    Very excited to see BERN2! Really nice work so far.

    I'm looking to map certain mentions of proteins to standard identifiers. Here's a list of these proteins, where each protein is also followed by a direction of activity:

    3 beta hydroxysteroid dehydrogenase 5 stimulator; AF4/FMR2 protein 2 inhibitor; Adenylate cyclase 2 stimulator; Alpha gamma adaptin binding protein p34 stimulator; BR serine threonine protein kinase 1 stimulator; Complement Factor B stimulator; DNA gyrase B inhibitor; Ectonucleotide pyrophosphatase-PDE-3 stimulator; Falcipain 1 stimulator; Homeobox protein Nkx 2.4 stimulator; ISLR protein inhibitor; Integrin alpha-IIb/beta-4 antagonist; Inter alpha trypsin inhibitor H5 stimulator; Interleukin receptor 17B antagonist; Isopropylmalate dehydrogenase stimulator; Methylthioadenosine nucleosidase stimulator; Patched domain containing protein 2 inhibitor; Protein FAM161A stimulator; Protocadherin gamma A1 inhibitor; Ring finger protein 4 stimulator; SMAD-9 inhibitor; Small ubiquitin related modifier 1 inhibitor; Sodium-dicarboxylate cotransporter-1 inhibitor; Sorting nexin 9 inhibitor; Sugar phosphate exchanger 2 stimulator; Transcription factor p65 stimulator; Tumor necrosis factor 14 ligand inhibitor; Ubiquitin-conjugating enzyme E21 stimulator; Unspecified ion channel inhibitor; Zinc finger BED domain protein 6 inhibitor

    Using the nice web interface, I get:

    image

    So overall BERN2 does a good job recognizing the protein mentions. However, we actually already know what the protein text is, and are more interested in normalization. Most of the gene/protein mentions receive "ID: CUI-less". Any advice on how to improve the performance of named entity normalization for human proteins?

    I see that the website notes that normalization is done by https://github.com/dmis-lab/BioSyn, so feel free to migrate this issue to that repo if it's best there.

    opened by dhimmel 5
  • Unable to get response

    Unable to get response

    I get the following error:

    [Errno 2] No such file or directory : './resources/GNormPlusJava/output/2ec5cc999ceefc8f5a83a423fe6db771ab7868adf7fb74598c36ccd.PubTator' -> ./resources/tmVarJava/input/2ec5cc999ceefc8f5a83a423fe6db771ab7868adf7fb74598c36ccd.PubTator.PubTator.Gene

    does anyone can help me fix this?

    I'm not able to get response when I call the rest api. Could someone please help?

    opened by Wickkey 0
  • Unable to run it on Ubuntu 22. Anaconda already runs on port 8888. Response 403.

    Unable to run it on Ubuntu 22. Anaconda already runs on port 8888. Response 403.

    Can you please publish a video for the local installation. Trying on Ubuntu with already exiting environment of Jupyter. Nothing is running on 8888. 403 error.

    opened by zeusstuxnet 0
  • Unable to install bern2 dependencies on Mac OS

    Unable to install bern2 dependencies on Mac OS

    Hi,

    I am trying to install bern2 dependencies on mac Os Montery. When I run the below commands , I am getting package not found error for cudatoolkit and faiss-gpu. And these version are not available for osx. I confirmed it through conda search and also by searching on anaconda.org search packages.

    Let me know if I can run this on osx ?

    Dependencies : conda install pytorch==1.9.0 cudatoolkit=10.2 -c pytorch conda install faiss-gpu libfaiss-avx2 -c conda-forge

    Thanks

    opened by naveenjack 3
Releases(v1.1.0)
Owner
DMIS Laboratory - Korea University
Data Mining & Information Systems Laboratory @ Korea University
DMIS Laboratory - Korea University
This is the library for the Unbounded Interleaved-State Recurrent Neural Network (UIS-RNN) algorithm, corresponding to the paper Fully Supervised Speaker Diarization.

UIS-RNN Overview This is the library for the Unbounded Interleaved-State Recurrent Neural Network (UIS-RNN) algorithm. UIS-RNN solves the problem of s

Google 1.4k Dec 28, 2022
A method for cleaning and classifying text using transformers.

NLP Translation and Classification The repository contains a method for classifying and cleaning text using NLP transformers. Overview The input data

Ray Chamidullin 0 Nov 15, 2022
Which Apple Keeps Which Doctor Away? Colorful Word Representations with Visual Oracles

Which Apple Keeps Which Doctor Away? Colorful Word Representations with Visual Oracles (TASLP 2022)

Zhuosheng Zhang 3 Apr 14, 2022
This repository serves as a place to document a toy attempt on how to create a generative text model in Catalan, based on GPT-2

GPT-2 Catalan playground and scripts to train a GPT-2 model either from scrath or from another pretrained model.

Laura 1 Jan 28, 2022
Facebook AI Research Sequence-to-Sequence Toolkit written in Python.

Fairseq(-py) is a sequence modeling toolkit that allows researchers and developers to train custom models for translation, summarization, language mod

13.2k Jul 07, 2021
A repository to run gpt-j-6b on low vram machines (4.2 gb minimum vram for 2000 token context, 3.5 gb for 1000 token context). Model loading takes 12gb free ram.

Basic-UI-for-GPT-J-6B-with-low-vram A repository to run GPT-J-6B on low vram systems by using both ram, vram and pinned memory. There seem to be some

90 Dec 25, 2022
A Domain Specific Language (DSL) for building language patterns. These can be later compiled into spaCy patterns, pure regex, or any other format

RITA DSL This is a language, loosely based on language Apache UIMA RUTA, focused on writing manual language rules, which compiles into either spaCy co

Šarūnas Navickas 60 Sep 26, 2022
Multilingual text (NLP) processing toolkit

polyglot Polyglot is a natural language pipeline that supports massive multilingual applications. Free software: GPLv3 license Documentation: http://p

RAMI ALRFOU 2.1k Jan 07, 2023
A design of MIDI language for music generation task, specifically for Natural Language Processing (NLP) models.

MIDI Language Introduction Reference Paper: Pop Music Transformer: Beat-based Modeling and Generation of Expressive Pop Piano Compositions: code This

Robert Bogan Kang 3 May 25, 2022
This library is testing the ethics of language models by using natural adversarial texts.

prompt2slip This library is testing the ethics of language models by using natural adversarial texts. This tool allows for short and simple code and v

9 Dec 28, 2021
STT for TorchScript is a port of Coqui STT based on DeepSpeech to PyTorch.

st3 STT for TorchScript is a port of Coqui STT based on DeepSpeech to PyTorch. Currently it supports converting pbmm models to pt scripts with integra

Vlad Ki 8 Oct 18, 2021
Korean stereoypte detector with TUNiB-Electra and K-StereoSet

Korean Stereotype Detector Korean stereotype sentence classifier using K-StereoSet with TUNiB-Electra Web demo you can test this model easily in demo

Sae_Chan_Oh 11 Feb 18, 2022
BERN2: an advanced neural biomedical namedentity recognition and normalization tool

BERN2 We present BERN2 (Advanced Biomedical Entity Recognition and Normalization), a tool that improves the previous neural network-based NER tool by

DMIS Laboratory - Korea University 99 Jan 06, 2023
Code for papers "Generation-Augmented Retrieval for Open-Domain Question Answering" and "Reader-Guided Passage Reranking for Open-Domain Question Answering", ACL 2021

This repo provides the code of the following papers: (GAR) "Generation-Augmented Retrieval for Open-domain Question Answering", ACL 2021 (RIDER) "Read

morning 49 Dec 26, 2022
Deploying a Text Summarization NLP use case on Docker Container Utilizing Nvidia GPU

GPU Docker NLP Application Deployment Deploying a Text Summarization NLP use case on Docker Container Utilizing Nvidia GPU, to setup the enviroment on

Ritesh Yadav 9 Oct 14, 2022
Original implementation of the pooling method introduced in "Speaker embeddings by modeling channel-wise correlations"

Speaker-Embeddings-Correlation-Pooling This is the original implementation of the pooling method introduced in "Speaker embeddings by modeling channel

Themos Stafylakis 10 Apr 30, 2022
PyTorch implementation of "data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language" from Meta AI

data2vec-pytorch PyTorch implementation of "data2vec: A General Framework for Self-supervised Learning in Speech, Vision and Language" from Meta AI (F

Aryan Shekarlaban 105 Jan 04, 2023
Sequence model architectures from scratch in PyTorch

This repository implements a variety of sequence model architectures from scratch in PyTorch. Effort has been put to make the code well structured so that it can serve as learning material. The train

Brando Koch 11 Mar 28, 2022
A collection of GNN-based fake news detection models.

This repo includes the Pytorch-Geometric implementation of a series of Graph Neural Network (GNN) based fake news detection models. All GNN models are implemented and evaluated under the User Prefere

SafeGraph 251 Jan 01, 2023
This repository contains all the source code that is needed for the project : An Efficient Pipeline For Bloom’s Taxonomy Using Natural Language Processing and Deep Learning

Pipeline For NLP with Bloom's Taxonomy Using Improved Question Classification and Question Generation using Deep Learning This repository contains all

Rohan Mathur 9 Jul 17, 2021