For the most part, getting the lyrics for your foreign-language music is a cakewalk: just search for the translation of the English word "lyrics" in your target language, the name of the artist (in quotes if more than one word), and the song title (again, in quotes if more than one word).
To take an example, if you want to find the lyrics to the song En el muelle de San Blás by the Spanish-language band Maná, Googling:
Japanese lyrics, however, are a bit more complicated, and perhaps surprisingly it's for reasons that have nothing to do with the language itself.
You can of course copy and paste Japanese text just like any other text, but many websites that host the lyrics for Japanese songs take steps to prevent you from doing that, presumably because of copyright issues. The result is that, in order to get the text of Japanese lyrics for your personal educational use, it's not often going to be as simple as copying and pasting. That said, it's generally not that hard to get the text of the lyrics and will usually only take a little bit longer than just copying and pasting.
We'll start with the easiest sites to get the lyrics from and move on to the more difficult ones. The song we'll try to get the lyrics for is the Ulfuls' Gattsu Da Ze, the video of which has both ninjas and explosions.
Mojim and JetLyrics
To check these sites, simply add "mojim" or "jetlyrics" to your Google search terms, such as:
The one annoying thing about these sites is that they stick an additional line of text in the middle of the lyrics. On Mojim, it's "轉載來自 ※ Mojim.com 魔鏡歌詞網" and, on JetLyrics, it's the name of the artist, the song title, and the word "Lyrics", e.g.: "ウルフルズ ガッツだぜ!! Lyrics". So deleting that superfluous text is the one extra step that you'll need on these sites beyond simply copying and pasting.
If Mojim and JetLyrics don't get you your Japanese lyrics, then the next lyrics site you'll want to try is J-Lyric. To see if the lyrics you want are available, use the same pattern for the search string as above but add "j-lyric" instead of "mojim" or "jetlyric", e.g.:
- From the "View" menu's "Developer" submenu, select "View Source".
- In the source code, search for the first line of the lyrics, or just scroll down until you find it.
- Copy from the first line of the lyrics (starting on the line after "
<p id='lyricBody'>") down to but not including the "
<br />" at the end of the last line of the lyrics.
- In a text editor, make a plain-text document and paste in the copied text. To make a plain-text document in, for example, TextEdit, make a new document and then, from the "Format" menu, select "Make Plain Text".
- Find and replace "<br />" with nothing, i.e., leave the replace field blank but then replace all. This will delete all occurrences of "<br />" from the lyrics.
- Copy and paste the cleaned-up lyrics wherever you want to use them.
Goo, UtaMap, Uta-Net, Kasi-Time, etc.
If you still haven't found your lyrics, remove "j-lyric" from your Google search and run it again, e.g.:Goo, UtaMap, Uta-Net, Kasi-Time, and others among your top hits. One of these will likely have the lyrics you're looking for, but you won't be able to copy them from the website or pluck them out of the source code. Instead, you'll need to take a screen shot and then use optical character recognition, or OCR, to convert them to text. This is by far the most time-consuming way to get the text of Japanese-song lyrics, but it will still be far less time than typing them up on your own. (And, luckily, you'll probably be able to find most lyrics without resorting to this method.)
Before you actually start converting images to text, there's a one-time set-up you'll need to do:
- Download the free "Community Version" of PDF OCR X, which is available for both Mac and Windows. The free version is limited to single-page images, but that should be suitable for screen grabs.
- Open PDF OCR X and drag and drop any image file onto the "PDF OCR X" window.
- In the "PDF OCR X: Please choose your conversion settings" window, click on "Add More Languages". This will take you to a webpage for PDF OCR X's language packs.
- Click on "jpn.traineddata.zip".
- Once the zip file has downloaded, unzip the file and drag and drop "jpn.traineddata" onto the "PDF OCR X" window. This will add Japanese to the languages PDF OCR X can recognize.
- In your browser, increase your zoom so that the lyrics are a pretty decent size on your screen. In most browsers, this can be accomplished by pressing command and = on a Mac or CTRL and = on Windows. (You should get better OCR results with a larger font size, but you'll also likely need to take more screen shots, which may result in you wasting more time than just cleaning up the somewhat messier OCR that you'll get at a smaller font size. Although I didn't do much testing, 2 or 3 screen shots seemed about right.)
- Take a screen shot of just the lyrics you want the text of and save it to your desktop. On a Mac, in Grab.app, from the "Capture" menu, select "Selection" to grab only the part of the screen that has the lyrics. In Windows' Snipping Tool, the same can be done by selecting "Rectangular Snip" from the "New" menu. As noted above, you might need to take a few screen shots if the lyrics don't fit on your screen. Both Mac OS X's Grab.app and Windows 7's Snipping Tool will save the screen grab as a TIFF file.
- Open PDF OCR X and drag and drop the screen grab's file onto the "PDF OCR X" window.
- In the "PDF OCR X: Please choose your conversion settings" window, select "Japanese" from the "Language" pull-down menu and click the "Convert" button. This will create a window called "Converted Text" that has the converted characters.
- In the "Converted Text" window, select all (press command and a or CTRL and a on Windows) and then copy and paste the text into a text document.
- If you made more than one screen shot, repeat steps 2 through 5 until all converted text is in the text document.
- Compare the converted text in your text document against the original website or the screen grabs, fixing any discrepancies. There will probably be a fair number of these, most likely making this step the most time-consuming part of the process. Likely mistakes will include English words that are included in the Japanese text, kana with normal and smaller forms (e.g., "よ" and "ょ"), spacing, and certain kanji.
- Copy and paste the cleaned-up lyrics wherever you want to use them.
PDF OCR X is one of a number of applications that take advantage of the tesseract-ocr engine, which is currently under the auspices of Google. You can also install tesseract-ocr directly on your computer, although the only way to access it will be through the command line.
Another completely free OCR option is this webpage, which makes use of the NHocr engine. While this one requires no initial set-up, there were two issues that led me to prefer tesseract-ocr.
First, I found that NHocr's accuracy wasn't quite as good as tesseract-ocr's. Check out this PDF file to see all the mark-ups I needed to make both the NHocr and the tesseract-ocr output match up with the original lyrics. Both require a fair amount of edits, but NHocr's output needed a bit more. In addition to the same recognition problems faced by tesseract mentioned above, NHocr had additional mistakes, such as recognizing "く" as "<", "き" as "書", "り" as "0", and so on.
Second, NHocr can't use TIFF files directly, so you'll also need to convert them into JPEG files. This isn't very hard to do, but it does add another step. On a Mac, this can be done by opening the TIFF file with Preview and selecting "Export" from the "File" menu and then exporting after changing the format to "JPEG".
There is also commercial OCR software out there that may provide better results, e.g., OCRkit ($38.99), ABBYY FineReader ($99.99), ReadIris ($129), OmniPage 18 ($149.99), and Adobe Acrobat Pro ($199, free trial, student/teacher discounts). We regularly use Adobe's OCR at work and the results are pretty good, so I imagine it would work very well for screen shots of machine-made text such as lyrics (here's one additional anecdote regarding Adobe's good accuracy for Japanese texts and here's a tutorial on using Acrobat's OCR). For a table comparing some of the above-mentioned software, see here.
Nevertheless, I've always been able to get any lyrics I wanted without needing to do any OCR in any case, so I haven't tested out any commercial software with lyrics.
With the above methods, you should be able to get the text of pretty much any lyrics you can get on your screen. Once you've got the text of the lyrics, they're ripe for being added to Learning with Texts and to iTunes, but I'll get into more detail on that next week.