To see text message timestamps, tap and drag the message screen to the left. Now you'll see the time each text in the thread was received. When you let go, the iPhone message timestamps will be hidden again.
Open the Language & Text pane of System Preferences. Click the Formats tab. The Dates format—specifically, the Short format in the Customize dialog for Dates—is what Mail uses for days prior to yesterday. The Times format—specifically, the Short format in the Customize dialog for Times—is what Mail uses for today.
You can look at /Users/$USER/Library/Application Support/AddressBook/Metadata and see the date/time stamp gets updated on all of them and checking Get Info you'll see the date/time stamp for both created and modified are the same. (At least it is on my Mac.)
They likely use Information Extraction techniques for this.
Here is a demo of Stanford's SUTime tool:
http://nlp.stanford.edu:8080/sutime/process
You would extract attributes about n-grams (consecutive words) in a document:
And then use a classification algorithm, and feed it positive and negative examples:
Observation nLetters nSymbols length prevWord nextWord isPartOfDate
"Feb." 3 1 4 "Wed" "29th" TRUE
"DEC" 3 0 3 "company" "went" FALSE
...
You might get away with 50 examples of each, but the more the merrier. Then, the algorithm learns based on those examples, and can apply to future examples that it hasn't seen before.
It might learn rules such as
Here is a decent video by a Google engineer on the subject
That's a technology Apple actually developed a very long time ago called Apple Data Detectors
. You can read more about it here:
http://www.miramontes.com/writing/add-cacm/
Essentially it parses the text and detects patterns that represent specific pieces of data, then applies OS-contextual actions to it. It's neat.
This is called temporal expression identification and parsing. Here are some Google searches to get you started:
https://www.google.com/#hl=en&safe=off&sclient=psy-ab&q=timebank+timeml+timex
https://www.google.com/#hl=en&safe=off&sclient=psy-ab&q=temporal+expression+tagger
One part of the puzzle could be the NSDataDetector
class. Its used to recognize some standard types like phone numbers.
I once wrote a parser to do this, using pyparsing. It's really very simple, you just need to get all the different ways right, but there aren't that many. It only took a few hours and was pretty fast.
Apple has a patent on how they did it System and method for performing an action on a structure in computer data, and here's a story on this patent apples-patent-on-nsdatadetector
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With