Skip to content

Instantly share code, notes, and snippets.

@yigitozkavci
Created July 15, 2018 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yigitozkavci/e4e60399f1ddab38873c244c291c2eab to your computer and use it in GitHub Desktop.
Save yigitozkavci/e4e60399f1ddab38873c244c291c2eab to your computer and use it in GitHub Desktop.
Small script for finding phonetic description of words
phon() {
f=$(mktemp)
curl -sX GET -H 'User-Agent: Mozilla/4.0' "http://www.phonemicchart.com/transcribe/?w=$1" > "$f"
xmllint --xpath "//center/span/text()" --html $f 2>/dev/null
rm $f
}
# Example usage:
# $ phon merry
# > /'mærɪ/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment