{"id":13754384,"url":"https://github.com/rz-zhang/SeqMix","last_synced_at":"2025-05-09T22:32:19.131Z","repository":{"id":40736334,"uuid":"299261590","full_name":"rz-zhang/SeqMix","owner":"rz-zhang","description":"The repository for our EMNLP'20 paper SeqMix: Augmenting Active Sequence Labeling via Sequence Mixup.","archived":false,"fork":false,"pushed_at":"2021-09-05T07:20:20.000Z","size":1937,"stargazers_count":43,"open_issues_count":3,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-16T07:33:31.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rz-zhang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-28T09:42:26.000Z","updated_at":"2024-09-23T10:17:46.000Z","dependencies_parsed_at":"2022-08-19T19:52:14.463Z","dependency_job_id":null,"html_url":"https://github.com/rz-zhang/SeqMix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rz-zhang%2FSeqMix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rz-zhang%2FSeqMix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rz-zhang%2FSeqMix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rz-zhang%2FSeqMix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rz-zhang","download_url":"https://codeload.github.com/rz-zhang/SeqMix/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253336042,"owners_count":21892779,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T09:01:57.792Z","updated_at":"2025-05-09T22:32:14.121Z","avatar_url":"https://github.com/rz-zhang.png","language":"Python","funding_links":[],"categories":["其他_NLP自然语言处理","Beyond Vision"],"sub_categories":["其他_文本生成、文本对话","**NLP**"],"readme":"# SeqMix\nThe repository of our EMNLP'20 paper  \n**SeqMix: Augmenting Active Sequence Labeling via Sequence Mixup**  \n[[paper]](https://rongzhizhang.org/pdf/emnlp20_SeqMix.pdf)  [[slides]](https://rongzhizhang.org/slides/EMNLP20_SeqMix_Slides.pdf)  \n  \n![Illustration of the three variants of SeqMix](SeqMix.png)\n\n# Requirements\n- pytorch-transformers==1.2.0  \n- torch==1.2.0  \n- seqeval==0.0.5  \n- tqdm==4.31.1  \n- nltk==3.4.5  \n- Flask==1.1.1  \n- Flask-Cors==3.0.8  \n- pytorch_pretrained_bert==0.6.2  \n\nInstall the required packages:  \n```\npip install -r requirements.txt\n```\n\n# Key Parameters\n- `data_dir`: specify the data file, we provide CoNLL-03 dataset here \n- `max_seq_length`: maximum length of each sequence  \n- `num_train_epochs`: number of training epochs  \n- `train_batch_size`: batch size during model training  \n- `active_policy`: query policy of active learning  \n- `augment_method`: augmenting method  \n- `augment_rate`: augmenting rate  \n- `hyper_alpha`: parameter of Beta distribution\n\n# Run\n## Active learning part\nRandom Sampling  \n```\npython active_learn.py --active_policy=random\n```\nLeast Confidence Sampling  \n```\npython active_learn.py --active_policy=lc\n```\nNormalized Token Entropy sampling  \n```\npython active_learn.py --active_policy=nte\n```\n\n## Seqmix part\nWhole sequence mixup\n```\npython active_learn.py --augment_method=soft\n```\nSub-sequence mixup\n```\npython active_learn.py --augment_method=slack\n```\nLabel-constrained sub-sequence mixup\n```\npython active_learn.py --augment_method=lf\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frz-zhang%2FSeqMix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frz-zhang%2FSeqMix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frz-zhang%2FSeqMix/lists"}