Created
July 15, 2018 09:15
-
-
Save yigitozkavci/e4e60399f1ddab38873c244c291c2eab to your computer and use it in GitHub Desktop.
Small script for finding phonetic description of words
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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