Skip to main content

Python package for keyphrase labeling.

Project description

Kleis: Python package for keyphrase extraction

Kleis is a python package to label keyphrases in scientific text. It is named after the ancient greek word κλείς.


Pip (Easy and quick)

$ pip install kleis-keyphrase-extraction

Make your own wheel

$ git clone
$ cd kleis-keyphrase-extraction/
$ python sdist bdist_wheel
$ pip install dist/kleis_keyphrase_extraction-0.1.X.devX-py3-none-any.whl

Replace X with the corresponding values.

Note: This method doesn't include pre-trained models, you should download the corpus so it can train.


Example here


Thepackage already includes some pre-trained models but if you want to test by your own you should download the datasets.

Download from SemEval 2017 Task 10 and decompress in "~/kleis_data/corpus/semeval2017-task10" or "./kleis_data/corpus/semeval2017-task10"

$ ls ~/kleis_data/corpus/semeval2017-task10

brat_config       __MACOSX    scienceie2017_test_unlabelled  train2
dev       semeval_articles_test  zips


You can test your installation with

$ python

Also, see here for another example.


  • Python 3 (Tested: 3.6.5)
  • nltk (with corpus) (Tested: 3.2.5)
  • python-crfsuite (Tested: 0.9.5)



To run the noteooks in this repository install JupyterLab.

$ pip install jupyterlab

Then run the following command.

jupyter lab

Further information

This method uses a CRFs model (Conditional Random Fields) to label keyphrases in text, the model is trained with keyphrase candidates filtered with Part-of-Spech tag sequences. It is based on the method described here, but with a better performance. Please, feel free to send us comments or questions.

In this version we use python-crfsuite.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kleis-keyphrase-extraction, version 0.2a1.dev3
Filename, size File type Python version Upload date Hashes
Filename, size kleis_keyphrase_extraction-0.2a1.dev3-py3-none-any.whl (37.8 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size kleis-keyphrase-extraction-0.2a1.dev3.tar.gz (23.3 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page