title: How can I extract datetime from freeform text?
body: <p>I'm trying to come up with something along the lines of Google Calendar (or even some gmail messages), where freeform text will be parsed and converted to specific dates/times.</p>
  
  <p>Some examples (assume for simplicity that right now is January 01, 2013 at 1am):</p>
  
  <pre><code>"I should call Mom tomorrow to wish her a happy birthday" -&gt; "tomorrow" = "2013-01-02"
  "The super bowl is on Feb 3rd at 6:30pm" -&gt; "Feb 3rd at 6:30" =&gt; "2013-02-03T06:30:00Z"
  "Remind me to take out the trash on Friday" =&gt; "Friday" =&gt; "2013-01-04"
  </code></pre>
  
  <p>First of all I'll ask this - are there any already existing open source libraries that this (or part of this). If not, what sort of approaches do you think I should take?</p>
  
  <p>I am thinking of a few different possibilities:</p>
  
  <ol>
  <li>Lots of regular expressions, as many as I can come up with for each different use case</li>
  <li>Some sort of Bayesian Net that looks at n-grams and categorizes them into different scenarios like "relative date", "relative day of week", "specific date", "date and time", and then runs it through a rules engine (maybe more regex) to figure out the actual date.</li>
  <li>Sending it to a Google search and try to extract meaningful information from the search results (this one is probably not realistic)</li>
  </ol>