views:

57

answers:

1

Hi, I am trying to use this package: http://pypi.python.org/pypi/guess-language/0.1 I've read the documentation/wiki, but can't find the solution.

Basically, this package allows you to pass in a string, and it will return a "language". I'm able to make it print out "en".

htmlSource = download('http://feeds.feedburner.com/nchild')
soup = BeautifulStoneSoup(htmlSource)
justwords = ''.join(soup.findAll(text=True))
justwords = justwords.encode('utf-8')
true_lang =  guess_language.guessLanguage(justwords)

I'd like to know...how does this person print out the scores/accuracy of the guess?

http://stackoverflow.com/questions/2164899/am-i-passing-the-string-correctly-to-the-python-library/2165936#2165936

+1  A: 

By modifying the source code of the module, from the sounds of this quote (taken from the answer you linked to):

Update after some experimentation, including inserting a print statement to show what script blocks were detected with what percentages

(Emphasis added by me.)

Will McCutchen