On Aug 21, 2006, at 6:03 PM, Brian Kirsch wrote:
I know Brian was asking about the Chandler specific code, but wanted to point out some of the changes I was making to parsedatetime that may fit in.
Hi Darshana,So to recap it sounds like the date / time portion of the parser is leveraging ICU and thus when the locale is set to French can parse "Mardi" and treat it equivalent to"Tuesday" if the locale was English.
That's the code I'm working on now in the parsedatetime library.
However, if the locale was English and the parser encountered the word "Mardi" itwould not recognize it as a day of week token. Is this correct?
As it stands right now - correct. That's not to say at some later point I could get fancy and allow for a list of locales to be "active" - but that's definitely v2.0 stuff and parsedatetime hasn't hit 1.0 yet :)
How do the other natural language strings such as "dinner" get localized?
Right now they are localized within parsedatetime itself. The current code has a number of python lists that contain special words and phrases that are used during different parts of the parsing.
The new localizable code I'm working on moves those lists into a class that can be defined/overridden to define new locales. I was thinking of allowing for a "register a word lookup function" to allow the lists to be initialized by running them thru that function to create the localized versions.
Is this localization of natural language strings documented anywhere such as Wiki?
This I don't know - I haven't documented parsedatetime's localize api's yet but will be generating those api docs when I finish the code.
--- Bear Build and Release Engineer Open Source Applications Foundation (OSAF) [EMAIL PROTECTED] http://www.osafoundation.org [EMAIL PROTECTED] http://code-bear.com PGP Fingerprint = 9996 719F 973D B11B E111 D770 9331 E822 40B3 CD29
PGP.sig
Description: This is a digitally signed message part
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Open Source Applications Foundation "chandler-dev" mailing list http://lists.osafoundation.org/mailman/listinfo/chandler-dev
