Skip to content

xnliang98/uke_ccrank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Unsupervised Keyphrase Extraction

This is code for EMNLP 2021 paper: Unsupervised Keyphrase Extraction by Jointly Modeling Local and Global Context.

Update 2022-09-02: We release the data preprocess script and chinese keyphrase extraction code in https://github.com/xnliang98/CKE-ZH.

requirements

  • transformers==3.0.2
  • nltk
  • pytorch
  • tqdm

We employ StanfordCoreNLP Tools to preprocess the data.

Runing

Step 1: obtain embeddings of candidate phrases and the whole document.

python src/get_embedding.py --file_path [data_path] --file_name [file_name] --model_name [pretrained model name/path]

Step 2: extract keyphrases

python src/ranker.py [data_path] [model_name]

Comments & TODO

The middle layer representation of BERT model may get better performance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages