Skip to content

greysun/Conv-KNRM

 
 

Repository files navigation

Conv-KNRM

This is an implementation of the paper: Convolutional Neural Networks for Soft-Matching N-Grams in Ad-hoc Search

Inspired by project K-NRM by the author.

Features

  • python3.6 compatible
  • latest tensorflow features.
    • ok with tensorflow 1.10 or later
  • a Conv-KNRM implementation

Requirements


  • Tensorflow
  • Numpy
  • traitlets

Run

To run the Conv-KNRM model, just append an argument '--convolution true', for example:

Training

python ./knrm/model/model_knrm.py config-file\
    --train \
    --train_file: path to training data\
    --validation_file: path to validation data\
    --train_size: size of training data (number of training samples)\
    --checkpoint_dir: directory to store/load model checkpoints\
    --load_model: True or False. Start with a new model or continue training \
    --convolution true

Testing:

python ./knrm/model/model_knrm.py config-file\
    --test \
    --test_file: path to testing data\
    --test_size: size of testing data (number of testing samples)\
    --checkpoint_dir: directory to load trained model\
    --output_score_file: file to output documents score\
    --convolution true

For more details,see the original README file.

About

Convolutional Neural Networks for So-Matching N-Grams in Ad-hoc Search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Shell 0.6%