Skip to content

Instantly share code, notes, and snippets.

@Mitsos101
Created October 18, 2015 20:27
Show Gist options
  • Save Mitsos101/a0c9a585d25e1858d39d to your computer and use it in GitHub Desktop.
Save Mitsos101/a0c9a585d25e1858d39d to your computer and use it in GitHub Desktop.
Convert Sphinx .mfc to libsvm input file
cat *.mfc >> svm.input
awk '{for(i=1;i<=NF;++i) $i=i":"$i}1' svm.input > tmp.input && mv tmp.input svm.input && rm -f tmp.input
sed -i -e 's/^/+1 /' svm.input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment