Skip to content

Instantly share code, notes, and snippets.

@acetylSv
Last active February 25, 2019 16:24
Show Gist options
  • Save acetylSv/a8ff5ce9a16d5cf5eac562269fe68acf to your computer and use it in GitHub Desktop.
Save acetylSv/a8ff5ce9a16d5cf5eac562269fe68acf to your computer and use it in GitHub Desktop.
a script to call CMU_lexicon API
#/bin/sh
DIR='./txt_parts'
for filename in $DIR/*
do
echo ${filename}
curl -X POST -F "wordfile=@${filename}" \
-H "ContentType=multipart/form-data" http://www.speech.cs.cmu.edu/cgi-bin/tools/logios/lextool.pl \
-o ${filename}_res.txt
sleep 3
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment