├── .github └── workflows │ └── python-package-conda.yml ├── CITATION.cff ├── DA.py ├── Fine-tuning ├── README.md ├── benchmark │ └── README.md ├── opennre │ ├── __init__.py │ ├── encoder │ │ ├── __init__.py │ │ ├── base_encoder.py │ │ └── bert_encoder.py │ ├── framework │ │ ├── CB_loss.py │ │ ├── GHM_loss.py │ │ ├── LDAM_loss.py │ │ ├── __init__.py │ │ ├── data_loader.py │ │ ├── dice_loss.py │ │ ├── dice_loss_nlp.py │ │ ├── focal_loss.py │ │ ├── sentence_re.py │ │ └── utils.py │ ├── model │ │ ├── __init__.py │ │ ├── base_model.py │ │ ├── sigmoid_nn.py │ │ └── softmax_nn.py │ ├── module │ │ ├── __init__.py │ │ └── nn │ │ │ ├── __init__.py │ │ │ ├── cnn.py │ │ │ ├── lstm.py │ │ │ └── rnn.py │ ├── pretrain.py │ └── tokenization │ │ ├── __init__.py │ │ ├── basic_tokenizer.py │ │ ├── bert_tokenizer.py │ │ ├── utils.py │ │ ├── word_piece_tokenizer.py │ │ └── word_tokenizer.py └── train_supervised_bert.py ├── LICENSE ├── README.md ├── data ├── __init__.py ├── base_data_module.py ├── dialogue.py └── processor.py ├── dataset └── README.md ├── environment.yml ├── figs ├── DA.png ├── balance.png ├── fine-tuning.png ├── intro.png ├── moredata.png ├── prompt.png ├── prompts.png └── self-training.png ├── get_label_word.py ├── lit_models ├── CB_loss.py ├── GHM_loss.py ├── LDAM_loss.py ├── __init__.py ├── base.py ├── dice_loss.py ├── dice_loss_nlp.py ├── focal_loss.py ├── transformer.py └── util.py ├── main.py ├── merge_dataset.py ├── models ├── __init__.py ├── bert │ ├── __init__.py │ ├── configuration_bert.py │ ├── modeling_bert.py │ └── tokenization_bert.py ├── roberta │ ├── __init__.py │ ├── configuration_roberta.py │ ├── modeling_roberta.py │ └── tokenization_roberta.py └── trie.py ├── requirements.txt ├── resample.py ├── sample_10.py ├── sample_8shot.py ├── scripts ├── CMeIE.sh ├── ChemProt.sh ├── DuIE2.sh ├── SciERC.sh ├── dialog.sh ├── semeval.sh ├── tacrev.sh └── wiki80.sh └── self-train_combine.py /.github/workflows/python-package-conda.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/.github/workflows/python-package-conda.yml -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/CITATION.cff -------------------------------------------------------------------------------- /DA.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/DA.py -------------------------------------------------------------------------------- /Fine-tuning/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/README.md -------------------------------------------------------------------------------- /Fine-tuning/benchmark/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/benchmark/README.md -------------------------------------------------------------------------------- /Fine-tuning/opennre/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/__init__.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/encoder/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/encoder/__init__.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/encoder/base_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/encoder/base_encoder.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/encoder/bert_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/encoder/bert_encoder.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/CB_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/CB_loss.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/GHM_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/GHM_loss.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/LDAM_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/LDAM_loss.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/__init__.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/data_loader.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/data_loader.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/dice_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/dice_loss.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/dice_loss_nlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/dice_loss_nlp.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/focal_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/focal_loss.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/sentence_re.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/sentence_re.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/framework/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/framework/utils.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/model/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/model/__init__.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/model/base_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/model/base_model.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/model/sigmoid_nn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/model/sigmoid_nn.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/model/softmax_nn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/model/softmax_nn.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/module/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/module/__init__.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/module/nn/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/module/nn/__init__.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/module/nn/cnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/module/nn/cnn.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/module/nn/lstm.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/module/nn/lstm.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/module/nn/rnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/module/nn/rnn.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/pretrain.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/pretrain.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/tokenization/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/tokenization/__init__.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/tokenization/basic_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/tokenization/basic_tokenizer.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/tokenization/bert_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/tokenization/bert_tokenizer.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/tokenization/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/tokenization/utils.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/tokenization/word_piece_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/tokenization/word_piece_tokenizer.py -------------------------------------------------------------------------------- /Fine-tuning/opennre/tokenization/word_tokenizer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/opennre/tokenization/word_tokenizer.py -------------------------------------------------------------------------------- /Fine-tuning/train_supervised_bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/Fine-tuning/train_supervised_bert.py -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/README.md -------------------------------------------------------------------------------- /data/__init__.py: -------------------------------------------------------------------------------- 1 | from .dialogue import * -------------------------------------------------------------------------------- /data/base_data_module.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/data/base_data_module.py -------------------------------------------------------------------------------- /data/dialogue.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/data/dialogue.py -------------------------------------------------------------------------------- /data/processor.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/data/processor.py -------------------------------------------------------------------------------- /dataset/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/dataset/README.md -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/environment.yml -------------------------------------------------------------------------------- /figs/DA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/figs/DA.png -------------------------------------------------------------------------------- /figs/balance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/figs/balance.png -------------------------------------------------------------------------------- /figs/fine-tuning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/figs/fine-tuning.png -------------------------------------------------------------------------------- /figs/intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/figs/intro.png -------------------------------------------------------------------------------- /figs/moredata.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/figs/moredata.png -------------------------------------------------------------------------------- /figs/prompt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/figs/prompt.png -------------------------------------------------------------------------------- /figs/prompts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/figs/prompts.png -------------------------------------------------------------------------------- /figs/self-training.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/figs/self-training.png -------------------------------------------------------------------------------- /get_label_word.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/get_label_word.py -------------------------------------------------------------------------------- /lit_models/CB_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/CB_loss.py -------------------------------------------------------------------------------- /lit_models/GHM_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/GHM_loss.py -------------------------------------------------------------------------------- /lit_models/LDAM_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/LDAM_loss.py -------------------------------------------------------------------------------- /lit_models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/__init__.py -------------------------------------------------------------------------------- /lit_models/base.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/base.py -------------------------------------------------------------------------------- /lit_models/dice_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/dice_loss.py -------------------------------------------------------------------------------- /lit_models/dice_loss_nlp.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/dice_loss_nlp.py -------------------------------------------------------------------------------- /lit_models/focal_loss.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/focal_loss.py -------------------------------------------------------------------------------- /lit_models/transformer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/transformer.py -------------------------------------------------------------------------------- /lit_models/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/lit_models/util.py -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/main.py -------------------------------------------------------------------------------- /merge_dataset.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/merge_dataset.py -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/__init__.py -------------------------------------------------------------------------------- /models/bert/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/bert/__init__.py -------------------------------------------------------------------------------- /models/bert/configuration_bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/bert/configuration_bert.py -------------------------------------------------------------------------------- /models/bert/modeling_bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/bert/modeling_bert.py -------------------------------------------------------------------------------- /models/bert/tokenization_bert.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/bert/tokenization_bert.py -------------------------------------------------------------------------------- /models/roberta/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/roberta/__init__.py -------------------------------------------------------------------------------- /models/roberta/configuration_roberta.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/roberta/configuration_roberta.py -------------------------------------------------------------------------------- /models/roberta/modeling_roberta.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/roberta/modeling_roberta.py -------------------------------------------------------------------------------- /models/roberta/tokenization_roberta.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/roberta/tokenization_roberta.py -------------------------------------------------------------------------------- /models/trie.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/models/trie.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/requirements.txt -------------------------------------------------------------------------------- /resample.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/resample.py -------------------------------------------------------------------------------- /sample_10.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/sample_10.py -------------------------------------------------------------------------------- /sample_8shot.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/sample_8shot.py -------------------------------------------------------------------------------- /scripts/CMeIE.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/scripts/CMeIE.sh -------------------------------------------------------------------------------- /scripts/ChemProt.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/scripts/ChemProt.sh -------------------------------------------------------------------------------- /scripts/DuIE2.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/scripts/DuIE2.sh -------------------------------------------------------------------------------- /scripts/SciERC.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/scripts/SciERC.sh -------------------------------------------------------------------------------- /scripts/dialog.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/scripts/dialog.sh -------------------------------------------------------------------------------- /scripts/semeval.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/scripts/semeval.sh -------------------------------------------------------------------------------- /scripts/tacrev.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/scripts/tacrev.sh -------------------------------------------------------------------------------- /scripts/wiki80.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/scripts/wiki80.sh -------------------------------------------------------------------------------- /self-train_combine.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zjunlp/LREBench/HEAD/self-train_combine.py --------------------------------------------------------------------------------