Version 2009.01.18

jwlee
January 18, 2009, 11:44 AM posted in General Discussion

WeLoveChinesePod 2009.01.18 has been released.  This release contains several bug fixes and new features (since 2008.10.19.testing):

  • there are tooltips that are actually usable -- they are readable, and contain hyperlinks to various online resources, such as dictionaries and character stroke databases
  • the dialogue section identifies speakers, the expansion section identifies reviewed characters and vocabulary sections are in tabular form
  • the generated pages now support sound and look a bit better
  • there is an XSLT stylesheet to convert from XML to LaTeX to create user-customizable PDFs, as well an option to download the ChinesePod-generated ones
  • unparsed HTML caching option -- useful for debugging purposes, and so on
  • index generation -- WLCP now stores a pretty-looking list of downloaded lessons in a file called "wlcpod-index.xml" in the lessons directory to aid in finding lessons

Usage note: the entire directory structure has been overhauled.  Lessons are now stored (by default) in a sub-folder called "lessons", and the "settings.txt" file has been replaced by a much more comprehensive "wlcpod.ini" file that allows for considerable tweaking.  Other than that, usage is pretty much the same, and things still render optimally under Firefox.

 For more information see the WeLoveChinesePod web page. If you accept the license and disclaimer at the bottom of the WeLoveChinesePod web page, then feel free to download WeLoveChinesePod 2009.01.18.

Profile picture
andrew_c
January 18, 2009, 12:56 PM

awesome!

Profile picture
happy52
January 20, 2009, 04:11 AM

Thank you so much for this program the latest is really wonderful. I do have some questions about it. Some lessons don't dowload completely. An example is 敬老院之争. all it did is download the files that ChinesePod provides for download. The PDF files and the lesson and review mp3 files. Others download correctly but not all. Could you help me to see what I did wrong? Thanks

Profile picture
jwlee
January 21, 2009, 12:33 AM

Hi happy52, I'm glad you like it!

Don't worry, you didn't do anything wrong.  I also recently discovered this problem myself with some other lessons -- what happens is that sometimes the ChinesePod HTML is missing some traditional Chinese equivalents, which causes difficulties for WLCP.  I fixed the code for this already, and will upload a new version once I make sure I didn't break anything else in the process!

Profile picture
andrew_c
January 21, 2009, 02:37 AM

Hi Jon,

Just wondering, if the ChinesePod HTML is missing, then where else can you get the traditional characters from?  That was the only way I could think of getting them, since the vocabulary tab only has simplified characters.

Profile picture
jwlee
January 21, 2009, 07:20 AM

Hi Andrew,

Actually, I only "fixed" the code in the sense that the script no longer crashes when something like this happens, and more or less recovers gracefully by leaving the traditional entries blank.  I guess I could also elaborate a bit -- I tested the script on the newbie lessons, and it appears that the (unpublicized?!) traditional and simplified HTML files exist for all lessons more recent than, say, April 2007 or so.  The problem that happy52 ran into is that in the expansion tab, some of the CPod tooltips lack traditional character information -- you actually took this into account already with the "len(traditional) == len(simplified)" condition, but I broke the code when forcing words to always be split into individual characters for the sake of the WLCP tooltip hyperlinks.

I sort of suspected something bad like this might happen, so one can get the old WLCP behaviour by setting "old-pinyin-behaviour = yes" -- this is the last line of wlcpod.ini.  In case you're curious, I posted a copy of the current code (slightly modified from the released 2009.01.18 version) at http://math.stanford.edu/~jlee/cpod/wlcpod.py ; the relevant code is in the function create_xml_character_elements at line 107.  Any suggestions would be much appreciated, but otherwise I suppose I'll fix this by suppressing the tooltip hyperlinks and reverting to the old behaviour when traditional character information isn't available -- 2 of the 3 online databases can only handle traditional characters, anyway.

One alternative I've been thinking of is to use translate.google.com -- they offer conversion from simplified to traditional Chinese.  I sort of suspect this would work better for the expansion/dialogue sections than the vocabulary ones, since in the former case the sentences would hopefully provide enough context to pick the correct traditional character whenever multiple ones map to the same simplified one.

Profile picture
andrew_c
January 21, 2009, 01:07 PM

Thanks for sharing.

Regarding the last part about using translate.google.com:  The expansion/dialogue sentences should have traditional characters available, and if they don't that's really Praxis's problem for leaving them out for only some lessons, and should be reported to them on a per-lesson basis.  On the other hand, the vocabulary tab is the only one which needs to make use of translate.google.com in general.  But then, as you point out, there's not enough context to do a decent job.