├── README.md ├── bert ├── README.md ├── __init__.py ├── create_pretraining_data.py ├── extract_features.py ├── general_utils.py ├── modeling.py ├── modeling_test.py ├── optimization.py ├── optimization_test.py ├── run_classifier.py ├── run_classifier_predict_online.py ├── run_pretraining.py ├── theseus_replacement_scheduler.py ├── tokenization.py └── tokenization_test.py ├── common_utils.py ├── configs ├── __init__.py ├── base_config.py ├── bert_config.py ├── bert_mrc_config.py └── bert_word_config.py ├── data ├── orig_data_dev.txt ├── orig_data_test.txt ├── orig_data_train.txt ├── seg_orig_data_dev.json ├── seg_orig_data_test.json ├── seg_orig_data_train.json └── slot_pattern │ ├── base_slot_list │ ├── bert_basic_slot_list │ └── bert_complete_slot_pattern ├── data_processing ├── __init__.py ├── basic_prepare_data.py ├── bert_mrc_prepare_data.py ├── bert_prepare_data.py ├── bert_word_prepare_data.py ├── data_utils.py ├── mrc_query_map.py └── tokenize.py ├── load_and_predict.py ├── models ├── __init__.py ├── bert_lstmcrf.py ├── bert_mrc.py ├── layers │ ├── __init__.py │ ├── cnn_layers.py │ ├── crf_layers.py │ ├── crf_layers_pytorch.py │ ├── general_layers.py │ ├── lstm_crf_layers.py │ └── lstm_layers.py ├── lstm_cnn_crf.py ├── lstm_crf_model.py ├── lstm_only.py ├── tf_metrics.py ├── torch_mwa.py └── utils.py ├── optimization.py ├── pytorch_trainer.py ├── requirements.txt ├── result_stats.png ├── run.py ├── run_pred.sh ├── run_torch.py ├── run_torch.sh ├── run_train.sh ├── test_data_proessing.py ├── train_helper.py └── word_seg_utils.py /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/README.md -------------------------------------------------------------------------------- /bert/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/README.md -------------------------------------------------------------------------------- /bert/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/__init__.py -------------------------------------------------------------------------------- /bert/create_pretraining_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/create_pretraining_data.py -------------------------------------------------------------------------------- /bert/extract_features.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/extract_features.py -------------------------------------------------------------------------------- /bert/general_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/general_utils.py -------------------------------------------------------------------------------- /bert/modeling.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/modeling.py -------------------------------------------------------------------------------- /bert/modeling_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/modeling_test.py -------------------------------------------------------------------------------- /bert/optimization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/optimization.py -------------------------------------------------------------------------------- /bert/optimization_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/optimization_test.py -------------------------------------------------------------------------------- /bert/run_classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/run_classifier.py -------------------------------------------------------------------------------- /bert/run_classifier_predict_online.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/run_classifier_predict_online.py -------------------------------------------------------------------------------- /bert/run_pretraining.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/run_pretraining.py -------------------------------------------------------------------------------- /bert/theseus_replacement_scheduler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/theseus_replacement_scheduler.py -------------------------------------------------------------------------------- /bert/tokenization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/tokenization.py -------------------------------------------------------------------------------- /bert/tokenization_test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/bert/tokenization_test.py -------------------------------------------------------------------------------- /common_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/common_utils.py -------------------------------------------------------------------------------- /configs/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'lenovo' 2 | -------------------------------------------------------------------------------- /configs/base_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/configs/base_config.py -------------------------------------------------------------------------------- /configs/bert_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/configs/bert_config.py -------------------------------------------------------------------------------- /configs/bert_mrc_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/configs/bert_mrc_config.py -------------------------------------------------------------------------------- /configs/bert_word_config.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/configs/bert_word_config.py -------------------------------------------------------------------------------- /data/orig_data_dev.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/orig_data_dev.txt -------------------------------------------------------------------------------- /data/orig_data_test.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/orig_data_test.txt -------------------------------------------------------------------------------- /data/orig_data_train.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/orig_data_train.txt -------------------------------------------------------------------------------- /data/seg_orig_data_dev.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/seg_orig_data_dev.json -------------------------------------------------------------------------------- /data/seg_orig_data_test.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/seg_orig_data_test.json -------------------------------------------------------------------------------- /data/seg_orig_data_train.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/seg_orig_data_train.json -------------------------------------------------------------------------------- /data/slot_pattern/base_slot_list: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/slot_pattern/base_slot_list -------------------------------------------------------------------------------- /data/slot_pattern/bert_basic_slot_list: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/slot_pattern/bert_basic_slot_list -------------------------------------------------------------------------------- /data/slot_pattern/bert_complete_slot_pattern: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data/slot_pattern/bert_complete_slot_pattern -------------------------------------------------------------------------------- /data_processing/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'lenovo' 2 | -------------------------------------------------------------------------------- /data_processing/basic_prepare_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data_processing/basic_prepare_data.py -------------------------------------------------------------------------------- /data_processing/bert_mrc_prepare_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data_processing/bert_mrc_prepare_data.py -------------------------------------------------------------------------------- /data_processing/bert_prepare_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data_processing/bert_prepare_data.py -------------------------------------------------------------------------------- /data_processing/bert_word_prepare_data.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data_processing/bert_word_prepare_data.py -------------------------------------------------------------------------------- /data_processing/data_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data_processing/data_utils.py -------------------------------------------------------------------------------- /data_processing/mrc_query_map.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data_processing/mrc_query_map.py -------------------------------------------------------------------------------- /data_processing/tokenize.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/data_processing/tokenize.py -------------------------------------------------------------------------------- /load_and_predict.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/load_and_predict.py -------------------------------------------------------------------------------- /models/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'lenovo' 2 | -------------------------------------------------------------------------------- /models/bert_lstmcrf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/bert_lstmcrf.py -------------------------------------------------------------------------------- /models/bert_mrc.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/bert_mrc.py -------------------------------------------------------------------------------- /models/layers/__init__.py: -------------------------------------------------------------------------------- 1 | __author__ = 'lenovo' 2 | -------------------------------------------------------------------------------- /models/layers/cnn_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/layers/cnn_layers.py -------------------------------------------------------------------------------- /models/layers/crf_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/layers/crf_layers.py -------------------------------------------------------------------------------- /models/layers/crf_layers_pytorch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/layers/crf_layers_pytorch.py -------------------------------------------------------------------------------- /models/layers/general_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/layers/general_layers.py -------------------------------------------------------------------------------- /models/layers/lstm_crf_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/layers/lstm_crf_layers.py -------------------------------------------------------------------------------- /models/layers/lstm_layers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/layers/lstm_layers.py -------------------------------------------------------------------------------- /models/lstm_cnn_crf.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/lstm_cnn_crf.py -------------------------------------------------------------------------------- /models/lstm_crf_model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/lstm_crf_model.py -------------------------------------------------------------------------------- /models/lstm_only.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/lstm_only.py -------------------------------------------------------------------------------- /models/tf_metrics.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/tf_metrics.py -------------------------------------------------------------------------------- /models/torch_mwa.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/torch_mwa.py -------------------------------------------------------------------------------- /models/utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/models/utils.py -------------------------------------------------------------------------------- /optimization.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/optimization.py -------------------------------------------------------------------------------- /pytorch_trainer.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/pytorch_trainer.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/requirements.txt -------------------------------------------------------------------------------- /result_stats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/result_stats.png -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/run.py -------------------------------------------------------------------------------- /run_pred.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/run_pred.sh -------------------------------------------------------------------------------- /run_torch.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/run_torch.py -------------------------------------------------------------------------------- /run_torch.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/run_torch.sh -------------------------------------------------------------------------------- /run_train.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/run_train.sh -------------------------------------------------------------------------------- /test_data_proessing.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/test_data_proessing.py -------------------------------------------------------------------------------- /train_helper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/train_helper.py -------------------------------------------------------------------------------- /word_seg_utils.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/qiufengyuyi/sequence_tagging/HEAD/word_seg_utils.py --------------------------------------------------------------------------------