in reply to Idiom guessing script

I agree with Albannach. This sounds like a very comlex problem. Are you catagorizing a known set of books, or does your script need to be able to tell the language of any possible book title? If it's a known set of books, then that could make this job easier.

What's the actual problem you're trying to solve by figuring out the language of a book title? Maybe there's a better solution?

There are bound to be books written in one language with titles in another, and there will be books with words in the title from 2 or more languages. Not to mention words that are parts of multiple languages... Oh, yeah and books with titles that are part of no language...

If I had to do this, I'd think about writing a script to query Amazon or some other online list. Take advantage of a huge database someone else has set up.