推文使用ODL的元语法

时间:2010-08-14 06:35:19

标签: twitter syntax health-monitoring

我对使用Tweets / SMS / Identica或其他短文本状态更新系统跟踪日常生活观察(或ODL)的想法感兴趣。基本概念是您将状态更新发送到Twitter或Identi.ca,或者只是发送短信或其他格式,以后可以挖掘以显示模式。

你可以用它来追踪运动,饮食,你的电影喜好,你喜欢的任何东西。

要执行此操作,您需要具有允许人类和计算机轻松解析状态更新的语法。语法应该是密集的,它支持低字符数,但仍然是人类可读的。

这个想法并不新鲜,并且有许多推特应用程序用于跟踪锻炼和饮食习惯。 Twitter本质上已经是一个简短的文本ODL媒介,您可以通过查看搜索#feeling http://search.twitter.com/search?q=%23feeling轻松查看 或搜索#hurts http://search.twitter.com/search?q=%23hurts或旨在挖掘已经进入twitter的大量ODL数据的应用程序:http://www.tweetfeel.com/

通过使用Twitter跟踪ODL,您将停止战斗以迫使人们使用专为此创建的给定集成引擎,例如Google Health和HealthVault,而是专注于提高人们已经在使用的ODL跟踪系统的价值,像Facebook或Twitter。但要做到这一点,您需要一种通用的方法来输入ODL和数据挖掘这些条目,这样您就可以在更高或至少不同的级别获得意义。

还有一些语法可用于概括使用Twitter跟踪您喜欢的任何方法。这些是我最感兴趣的。到目前为止,我知道几个:

Daytum has a twitter syntax。它使用直接消息,如下所示:

d daytum item : amount 
// simple data label and value
d daytum item [category, category] : amount
// same thing but with tagging...

Your.flowingdata.com has a richer syntax。它还使用直接消息传递。

// yfd works with "action" and "value" pairs
d yfd weigh 160
d yfd exercised arms
d yfd watched Back to the Future
// but can be made more complex with units
d yfd drank 2 water
d yfd drank 1 coke
// and timestamps 
d yfd played xbox at 20:00
d yfd goodnight at 11:00pm
d yfd goodnight at 11pm

对于每个操作,yfd会询问您有关数据类型的一些信息,并要求您选择:

分类 - 如果您对使用不同单位发生相同操作感兴趣,例如吃了玉米 事件 - 如果兴趣点是某些事情发生,例如晚安或吵闹 反击 - 如果您对总时间感兴趣,那么您已做过一些事情,例如:抽了5支香烟 测量 - 如果您想查看某个值随时间变化的趋势,例如体重160或血压170

非常聪明没有?

我所知道的最后一个是Grafitter syntax。到目前为止,这是非常简洁的概念,因为它以非常聪明的方式使用主题标签......

//hashtag with comma separated tags
#mood(happy,elated,drunk)
#mood(sad,sober)
// scales, like not busy
#busy(1)
// very busy
#busy(5)
//straight up numbers
#lbs(250)
#worked(10)

Tweet your eats uses DMs也可以让你包括你吃的东西,以及卡路里/脂肪/点跟踪。所以语法看起来像

d tyeats #breakfast One bowl of cereal *c500
// the *c500 marks the tweet as 500 calories

当然,重要的是要注意已经登录到twitter的不同ODL生成软件使用的非常常见的自然语言模式,例如runkeeper,它通常会产生如下内容:

@meattwitter Just completed a 4.50 km run with @runkeeper. Check it out! http://rnkpr.com/aaaaa #RunKeeper

现在我的问题呢?

我忽略了什么其他重要的ODL语法? DM是正确的数据收集方式,还是应该关注主题标签? 还有其他重要的“自然”ODL除了管理员之外还会发生什么? 有没有人知道关于这个问题的任何正式研究(社交媒体状态更新中的ODL语法)? 有没有人知道任何实现这类事情的现有开源项目?

更新:Paul指出OMHE项目就是这样做的。 http://code.google.com/p/omhe/这是OMHE语法,它已经有一个基于python的解析器..

#The basic OMHE syntax follows this basic format"
[COMMAND_NAME]<VALUE><#[TAG]>

# Reporting WEIGHT (This is correct):
wt123.4

# In the previous example, COMMAND_NAME=wt and VALUE=123.4

# Reporting WEIGHT (Also Correct):
wt=123.4

# In the previous example, COMMAND_NAME=wt and VALUE=123.4

# Reporting WEIGHT with _TAGS_ (Also Correct) :
wt=123.4#mytag#myothertag

# The previous example has two tags: 'mytag' and 'myothertag'

# Weight is a command that requires a value (Incorrect):
wt

#You can never have an equal sign without a value. (Also Incorrect):
wt=

# Here is an OMHE string with two commands separated by white space " ".
# Says the command 'wt' (weight) has a value of '195' and blood glucose is 150.
wt195 bg=150

# Report the start of a menstrual cycle (correct):
# (Correct) mcycle is a command where value is not required 
mcycle

# Report the first day of a menstrual cycle:
# Notice we can still add tags even if no value is given 
mc

# Report the start of a menstrual cycle (Incorrect):
# You can't provide an equals "=" sign without a value: 
mc=

# Report the adherence to a health directive such as taking medication (correct):
# (Correct) did is a command where value is not required 
did

# Report the adherence to a health directive  to stretch arm (correct):
did=ARMSTRETCH

# Send Blood Glucose Level:
bg125

# Send Blood Pressure:
bp100d120p65

# Send Blood Pressure using the equals sign style:
bp=100d120p65

# Send Weight:
wt145
wt=145 #Express weight using the equals sign style
w78k   #Express weight in kilograms
wt145l  #Explicit express weight in pounds (lbs)
wt245.8 #Express fractional weight
wt245p8 #Another way to express fractional weight

# Send blood glucose, patient identifier, a note, and the date:
bg145 id213762732467234 nAllGood d20090117

# Sending blood glucose with a simple note tag (with spaces):
bg145#I'm*feeling*very*tired*today

# Report the start of a menstrual cycle:
mcycle

# Get a copy of your health benefits/insurance card:
gethc

# Send a copy of your health benefits card to someone via fax:
sendhc=6509840982#fax

# Send a copy of your health benefits card as a pdf to someone via email:
sendhc=nurse@mydoc.com#pdf

# Get a copy of your personal health record:
getphr

# Get a copy of your personal health record as a pdf:
getphr#pdf

# Get a copy of your personal health record in CCD format:
getphr#ccd

# Send a copy of your personal health record to someone in CCR format:
sendphrnurse@mydoc.com#ccr

# Send a copy of your personal health record to someone in XML microformat:
sendphr=nurse@mydoc.com#microformat

我的目标是在开源许可下编写解析器和数据显示工具,我一般都在寻找应该支持的类型。所以如果你能想到其他问题我应该要求为这样一个项目制作一份要求清单告诉我!例如,我知道,如果我正在讨论的扩展工作,或者完全并行实现,那么对于提及,DM,回复等标准Twitter语法的解析器有很好的实现。

暂时我很乐意假设系统不支持“私人”记录,除非有人能够以简洁的方式告诉我如何做到这一点。

3 个答案:

答案 0 :(得分:1)

嘿,弗雷德......你见过OMHE:http://code.google.com/p/omhe/

或OpenMRS消息传递社区正在进行的工作......(从OpenMRS网站搜索消息)...

鉴于SMS长度与推文长度非常类似,那些可能会给你一些关于消息语法的提示。 :)

希望这有帮助。

答案 1 :(得分:1)

佛瑞德:

我有一些代码正在处理一些针对健康追踪器的新项目的代码。具体来说,我正在将其构建为以前称为“Body4Break”的“Seven”项目。

http://github.com/aviars/b4b

现在它只是根据哈希标记来阻止评论,但我正在研究自动提取RunKeeper纯OMHE语法和其他可解析的推文。

-Alan

答案 2 :(得分:0)

刚刚发现有关Quantt quantter.com /

的信息

附带的语法。

http://blog.quantter.com/syntax

以及用于解释该语法的API。

http://beta.quantter.com/api/documentation