Solving Zero-Shot Learning in Named Entity Recognition with Common Sense Knowledge

Overview

Zero-Shot Learning in Named Entity Recognition with Common Sense Knowledge

Associated code for the paper Zero-Shot Learning in Named Entity Recognition with Common Sense Knowledge.

Description

Click on the poster for higher resolution

Citation

If you find that this project helps your research, please consider citing the related paper:

@misc{vanhoang2021zeroshot,
      title={Zero-Shot Learning in Named-Entity Recognition with External Knowledge}, 
      author={Nguyen Van Hoang and Soeren Hougaard Mulvad and Dexter Neo Yuan Rong and Yang Yue},
      year={2021},
      eprint={2111.07734},
      archivePrefix={arXiv},
      primaryClass={cs.AI}
}

Attributions

In this project, we make extensive use of LUKE and the CrossNER dataset.

Comments
  • Combined word embeddings and CLI arguments

    Combined word embeddings and CLI arguments

    The following changes are made for word embeddings:

    • Adds code to construct combined word embeddings by concatenating existing and then reducing the dimensionality.
    • Adds word embeddings for FastText and a combined embedding that is obtained by the above approach.
    • Renames existing word embeddings so they are easier to distinguish.

    The following modifications to the command line arguments in zero/ner/main.py are made:

    • Adds --embed to choose which word embed to use (default="conceptnet").
    • Adds --do-save/--no-save to choose whether to save the best model so far (default=True) - Reason being that if we are just exploring how different settings affect the model, there is no need to save the model and this will speed up running time slightly.
    • Adds validation for the domains chosen for --train-domains, --dev-domain, --test-domain.
    opened by shmulvad 2
  • evaluate is called with the output_file for the all_entities argument

    evaluate is called with the output_file for the all_entities argument

    The signature of zero.utils.evaluator.evaluate is as follows:

    def evaluate(args, model, fold, all_entities, output_file=None,
                 return_report=False):
        ...
    

    In zero.ner.main.run, we call it as follows:

    evaluate(args, zero, "train", train_output_file)
    evaluate(args, zero, "dev", dev_output_file)
    evaluate(args, zero, "test", test_output_file)
    

    where i.e. dev_output_file = os.path.join(args.output_dir, "dev_predictions.txt"). Notice how here dev_output_file and so on are actually supplied for the all_entities argument. Is this a problem?

    opened by shmulvad 1
  • No data/ner/conll2003/test.new.txt

    No data/ner/conll2003/test.new.txt

    It seems like there is no data/ner/conll2003/test.new.txt file while similar files exists for the other domains. This causes problems for certain evaluations.

    opened by shmulvad 1
  • Allow evaluating on all domains after model finishes training

    Allow evaluating on all domains after model finishes training

    This pull request allows to evaluate performance on all domains after training on a given train domain, dev domain using the CLI argument --eval-all (default=False).

    I can run the code on Colab without any runtime errors but I am not sure if I have any logical errors that will make the obtained results incorrect. Can you take a quick look and see if the logic is sound?

    opened by shmulvad 0
  • Documentation about training and inference

    Documentation about training and inference

    Hi, thank you for this repository and congratulations for your work!

    I am currently researching frameworks for Zero-Shot and Few-Shot NER for a personal real-world application. Could you please update the documentation to include examples of how to train and evaluate the model? It would also be nice to know how to extract the named entities in an arbitrary sentence based on your method for Zero-Shot and Few-Shot.

    opened by fillipefbr 1
Owner
Søren Hougaard Mulvad
MSc in CS at National University of Singapore. BSc from @diku-dk. Worked as a Software Developer at ByteDance and IT Minds.
Søren Hougaard Mulvad
Neural models of common sense. 🤖

Unicorn on Rainbow Neural models of common sense. This repository is for the paper: Unicorn on Rainbow: A Universal Commonsense Reasoning Model on a N

AI2 60 Jan 5, 2023
Code Repo for the ACL21 paper "Common Sense Beyond English: Evaluating and Improving Multilingual LMs for Commonsense Reasoning"

Common Sense Beyond English: Evaluating and Improving Multilingual LMs for Commonsense Reasoning This is the Github repository of our paper, "Common S

INK Lab @ USC 19 Nov 30, 2022
An Easy-to-use, Modular and Prolongable package of deep-learning based Named Entity Recognition Models.

DeepNER An Easy-to-use, Modular and Prolongable package of deep-learning based Named Entity Recognition Models. This repository contains complex Deep

Derrick 9 May 30, 2022
[ACL-IJCNLP 2021] Improving Named Entity Recognition by External Context Retrieving and Cooperative Learning

CLNER The code is for our ACL-IJCNLP 2021 paper: Improving Named Entity Recognition by External Context Retrieving and Cooperative Learning CLNER is a

null 71 Dec 8, 2022
[EMNLP 2021] Distantly-Supervised Named Entity Recognition with Noise-Robust Learning and Language Model Augmented Self-Training

RoSTER The source code used for Distantly-Supervised Named Entity Recognition with Noise-Robust Learning and Language Model Augmented Self-Training, p

Yu Meng 60 Dec 30, 2022
Chinese clinical named entity recognition using pre-trained BERT model

Chinese clinical named entity recognition (CNER) using pre-trained BERT model Introduction Code for paper Chinese clinical named entity recognition wi

Xiangyang Li 109 Dec 14, 2022
Code for Two-stage Identifier: "Locate and Label: A Two-stage Identifier for Nested Named Entity Recognition"

Code for Two-stage Identifier: "Locate and Label: A Two-stage Identifier for Nested Named Entity Recognition", accepted at ACL 2021. For details of the model and experiments, please see our paper.

tricktreat 87 Dec 16, 2022
Named Entity Recognition with Small Strongly Labeled and Large Weakly Labeled Data

Named Entity Recognition with Small Strongly Labeled and Large Weakly Labeled Data arXiv This is the code base for weakly supervised NER. We provide a

Amazon 92 Jan 4, 2023
Source Code For Template-Based Named Entity Recognition Using BART

Template-Based NER Source Code For Template-Based Named Entity Recognition Using BART Training Training train.py Inference inference.py Corpus ATIS (h

null 174 Dec 19, 2022
“Data Augmentation for Cross-Domain Named Entity Recognition” (EMNLP 2021)

Data Augmentation for Cross-Domain Named Entity Recognition Authors: Shuguang Chen, Gustavo Aguilar, Leonardo Neves and Thamar Solorio This repository

RiTUAL@UH 18 Sep 10, 2022
GLaRA: Graph-based Labeling Rule Augmentation for Weakly Supervised Named Entity Recognition

GLaRA: Graph-based Labeling Rule Augmentation for Weakly Supervised Named Entity Recognition

Xinyan Zhao 29 Dec 26, 2022
Example Of Fine-Tuning BERT For Named-Entity Recognition Task And Preparing For Cloud Deployment Using Flask, React, And Docker

Example Of Fine-Tuning BERT For Named-Entity Recognition Task And Preparing For Cloud Deployment Using Flask, React, And Docker This repository contai

Nikita 12 Dec 14, 2022
An elaborate and exhaustive paper list for Named Entity Recognition (NER)

Named-Entity-Recognition-NER-Papers by Pengfei Liu, Jinlan Fu and other contributors. An elaborate and exhaustive paper list for Named Entity Recognit

Pengfei Liu 388 Dec 18, 2022
[CVPR 2021] Released code for Counterfactual Zero-Shot and Open-Set Visual Recognition

Counterfactual Zero-Shot and Open-Set Visual Recognition This project provides implementations for our CVPR 2021 paper Counterfactual Zero-S

null 144 Dec 24, 2022
Rethinking of Pedestrian Attribute Recognition: A Reliable Evaluation under Zero-Shot Pedestrian Identity Setting

Pytorch Pedestrian Attribute Recognition: A strong PyTorch baseline of pedestrian attribute recognition and multi-label classification.

Jian 79 Dec 18, 2022
Weakly supervised medical named entity classification

Trove Trove is a research framework for building weakly supervised (bio)medical named entity recognition (NER) and other entity attribute classifiers

null 60 Nov 18, 2022
Chinese named entity recognization with BiLSTM using Keras

Chinese named entity recognization (Bilstm with Keras) Project Structure ./ ├── README.md ├── data │   ├── README.md │   ├── data 数据集 │   │   ├─

null 1 Dec 17, 2021
sense-py-AnishaBaishya created by GitHub Classroom

Compute Statistics Here we compute statistics for a bunch of numbers. This project uses the unittest framework to test functionality. Pass the tests T

null 1 Oct 21, 2021
This repo is the code release of EMNLP 2021 conference paper "Connect-the-Dots: Bridging Semantics between Words and Definitions via Aligning Word Sense Inventories".

Connect-the-Dots: Bridging Semantics between Words and Definitions via Aligning Word Sense Inventories This repo is the code release of EMNLP 2021 con

null 12 Nov 22, 2022