Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

MiaomiaoLi2/RulePrompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RulePrompt

The source code used for paper RulePrompt: Weakly Supervised Text Classification with Prompting PLMs and Self-Iterative Logical Rules, published in WWW 2024.

Requirements

Before running, you need to first install the required packages by typing following commands:

pip install -r requirements.txt

Also, you need to download the stopwords in the NLTK library:

import nltk
nltk.download('stopwords')

Dataset

We use four benchmark datasets: AGNews, 20News, NYT-Topics can be found at here; and IMDB can be found at here. The label names and templates are provided in label_names.txt and manual_template.txt. Only train.txt will be used as unlabeled text corpus; train_labels.txt are provided for completeness and evaluation purpose.

Run the code

We provide scripts to reproduce our results on the benchmark datasets in ./scripts/. You can run them in the root directory by:

bash ./scripts/20News.sh

Citations

If you find our work useful for your research, please cite the following paper:

@inproceedings{li2024ruleprompt,
    title={RulePrompt: Weakly Supervised Text Classification with Prompting PLMs and Self-Iterative Logical Rules}, 
    author={Miaomiao Li and Jiaqi Zhu and Yang Wang and Yi Yang and Yilin Li and Hongan Wang},
    year={2024},
    booktitle={Proceedings of the ACM Web Conference 2024}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published