--add_timexdiff
Switch
--add_timexdiff
Description
Creates a feature table of the (mean, std) difference between each message's post-time and the time expressions mentioned within it (e.g. "see you tomorrow" vs. when it was posted).
Argument and Default Value
No argument. Boolean switch, default: False. Uses --date_field to know each message's post-time.
Details
Requires a running Stanford CoreNLP server on localhost (FeatureExtractor.addTimexDiffFeatTable() connects via jsonrpclib.Server("http://localhost:%d" % serverPort)) with time-expression annotation already available — not something set up in this pass.
Known issue — broken in SQLite mode too, and hit first. Verified: under a SQLite corpus, this fails before ever reaching the CoreNLP server logic — mm.disableTableKeys(...) (same pattern as --add_char_ngrams) throws sqlite3.OperationalError: near "DISABLE": syntax error while creating the destination table.
Other Switches
Required Switches:
A running Stanford CoreNLP server (external, not installable via pip)
Example Commands
Requires MySQL and a running CoreNLP server — not runnable as-is against the packaged SQLite dla_tutorial dataset:
dlatkInterface.py -d dla_tutorial -t msgs -c user_id --date_field date --add_timexdiff