r5 - 27 Oct 2006 - 11:56:35 - DarshanaChhajedYou are here: OSAF >  Journal Web  >  ContributorNotes > DarshanaChhajed > NLP

Natural Language Parsing in Detail view of Calendar

Introduction

The project is about natural language date/time parsing in Chandler.

The date/time widgets in the Detail View of the Calendar can parse the dates and times only in one specific format. Also, they do not understand natural language date/time strings.They provide very little or no support for auto-completion of recognizable strings.

The goal of this project is to enhance Chandler by allowing the users to enter any of the widely accepted date/time formats, natural language date/time strings, weekdays, month names, etc in the date/time widgets in the detail view of the Calendar in Chandler. It also supports i18n and l10n.

People


Original Project Proposal

http://wiki.osafoundation.org/bin/view/Journal/InternProjectNaturalLanguageUnderstanding

Related Bugs


Implementation

  • ParseDateTime library:
    The parsedatetime library is used to perform the natural language parsing. It can parse 'human readable' date and time text.
    It is a stand-alone module which can be downloaded from Python Cheeseshop, Google and the project page.
    This library uses regular expressions to parse many different formats of natural language dates/times and ranges. It uses PyICU, if available. Support is provided for date/times in different locales.

  • Integration with Chandler:
    The text entered in the date/time widgets in Chandler is parsed by the parsedatetime library. Auto-completion is provided for the recognizable date/time strings. A list of all the possible string matches comes up depending on what the user enters. The first completion match in the list is automatically selected.

    To read about how this is actually done, go to Enhancing Attribute Editors.

Working of the Date/Time widgets now

  • Typing 'tomorrow' in the date fields in the Chandler Detail view would set the date as tomorrow's date.
    The date related text that is currently parsed is today, tomorrow, yesterday, weekdays and month names.Also strings like "This week", "EOW" or "Next/last/this Wednesday" can be parsed
month.JPG EOW.JPG

  • Typing weekday names in the date field would set the date to the next occurance of that weekday
image1.JPG

  • Typing 'lunch' in the time fields in the Chandler Detail view would set the time as 12:00 PM.
    The time related text that is currently parsed is morning(6am), breakfast(8am), noon and lunch(12pm), evening(6pm), dinner (7pm), night and tonight(9pm) and midnight(12am)
time_dropdown.JPG

  • Incomplete date/time or different date/time formats are also recognized
    * 5p would be 5:00 PM
    * 5pm would be 5:00 PM
    * 20/7 would be 20/07/2006
    * 5.5.06 would be 05/05/2006
date_autocomplete.JPG

  • A '?' appears at the end of the date/time strings which are not recognised (or parsed)
ques.JPG


Related Documentation links

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
jpgJPG image1.JPG manage 14.1 K 13 Sep 2006 - 10:38 DarshanaChhajed  
jpgJPG EOW.JPG manage 13.1 K 13 Sep 2006 - 10:47 DarshanaChhajed  
jpgJPG date_autocomplete.JPG manage 12.5 K 13 Sep 2006 - 10:48 DarshanaChhajed  
jpgJPG time_dropdown.JPG manage 14.5 K 13 Sep 2006 - 10:48 DarshanaChhajed  
jpgJPG month.JPG manage 12.6 K 13 Sep 2006 - 10:48 DarshanaChhajed  
jpgJPG ques.JPG manage 11.0 K 13 Sep 2006 - 10:49 DarshanaChhajed  
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r5 < r4 < r3 < r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.