Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Data for the shared task is available at, and the review paper is available at

A Baseline System For CCKS-2019-IPRE


We provide a baseline system based on convolutional neural network with selective attention.

Getting Started

Environment Requirements

  • python 3.6
  • numpy
  • tensorflow 1.12.0

Step 1: Download data

Please download the data from the competition website, then unzip files and put them in ./data/ folder.

Step 2: Train the model

You can use the following command to train models for Sent-Track or Bag-Track:

python --level sent 
python --level bag

The model will be stored in ./model/ floder. We provide large scale unmarked corpus for train word vectors or language mdoels. The word vectors used in baseline system are trained by a package named gensim in python, and some parameters are set as follows:

from gensim.models import word2vec
model = word2vec.Word2Vec(sentences, sg=1, size=300, window=5, min_count=10, negative=5, sample=1e-4, workers=10)

Step 3: Test the model

You can use the following command to test models for Sent-Track or Bag-Track:

python --mode test --level sent 
python --mode test --level bag

Predicted results will be stored in result_sent.txt or result_bag.txt.


We use f1 score as the basic evaluation metric to measure the performance of systems. In our baseline system, we get about 0.22 f1 score in Sent-track and about 0.31 f1 score in Bag-Track by using pre-trained word vectors.


  • Wang H, He Z, Zhu T, et al. CCKS 2019 Shared Task on Inter-Personal Relationship Extraction[J]. arXiv preprint arXiv:1908.11337, 2019.
  • Lin Y, Shen S, Liu Z, et al. Neural relation extraction with selective attention over instances[C]//Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2016, 1: 2124-2133.


baseline for ccks2019-ipre



No releases published


No packages published