Skip to content

Text classification code described in "SoPa: Bridging CNNs, RNNs, and Weighted Finite-State Machines" by Roy Schwartz, Sam Thomson and Noah A. Smith, ACL 2018

License

Notifications You must be signed in to change notification settings

Noahs-ARK/soft_patterns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soft_patterns

Neural Gappy Patterns

Setup

conda env create -f environment.yml
source activate softpatterns

I also had set the following env var on Mac:

LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/Users/sam/anaconda3/pkgs/mkl-11.3.3-0/lib"

Training

datadir="/Users/sam/data/stanford_sentiment_binary" # or wherever you download the dataset
wordvecfile="${datadir}/../glove/glove.6B.50d.txt" # e.g.

python3 soft_patterns.py \
    -e ${wordvecfile} \
    --td ${datadir}/train.data \
    --tl ${datadir}/train.labels \
    --vd ${datadir}/dev.data \
    --vl ${datadir}/dev.labels \
    -p "5:50,4:50,3:50,2:50" \
    --model_save_dir ./experiments/blah/

About

Text classification code described in "SoPa: Bridging CNNs, RNNs, and Weighted Finite-State Machines" by Roy Schwartz, Sam Thomson and Noah A. Smith, ACL 2018

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published