Skip to content

A Hierarchical Structrued Attention for Paraphrase Indentification(Quora, Xianer etc) Task

Notifications You must be signed in to change notification settings

geofftong/Paraphrase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hierarchical Structrued Attention for Paraphrase Indentification(Quora, Xianer etc) Task.

The detailed implementation please see the additional PPT.

Requirements

  • PyTorch 0.2
  • tqdm
  • matplotlib
  • Java >= 8 (for Stanford CoreNLP utilities)
  • Python >= 2.7

Usage

First, run the script ./fetch_and_preprocess.sh to download Stanford Parser and Stanford POS Tagger, and generates dependency parses of the Xianer dataset using this Dependency Parser.

Second, go to src directory and run python main_xianer.py to train and test the xianer model, and have a look at config.py for command-line arguments. The predict result is in the 'data' directiry, and attention visualization result is in the 'img' directiry.

Note

  • PyTorch 0.1x don't support Biliear Network, and need to modify some built-in functions.
  • Pretrained Chinese word embedding file can find in 'xxx/embedding/huge.readable' in xxx.
  • Add 'xxx/anaconda2/bin' to the PATH in xxx can run our project properly.

Acknowledgements

Riddhiman Dasgupta for the pyTorch implementation of the tree-lstm. Kai Sheng Tai for the original LuaTorch implementation, and to the Pytorch team for the fun library.

About

A Hierarchical Structrued Attention for Paraphrase Indentification(Quora, Xianer etc) Task

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published