Skip to content

Instantly share code, notes, and snippets.

@edstenson
edstenson / input
Last active December 29, 2015 12:59
{
"interaction": {
"content": "Check out my holiday pics, Venice was beautiful!",
"source": "Twitter for iPhone"
},
“twitter”: {
}
}
{
"tag_tree": {
"us": {
"banks": [
"WFC"
]
},
"uk": {
"banks": [
"LLOY.L"
{
"interaction": {
"user": "datasift",
"id": "155505157",
"title": "Example",
"content": "JPMorgan Chase and Wells Fargo.",
"tag_tree": {
"finance": {
"banks": [
"JPM"
{
"interaction": {
"user": "datasift",
"id": "155505157",
"title": "Example",
"content": "I'm selling Fifth Third, buying Wells Fargo, and staying short on Microsoft.",
"tag_tree": {
"banks": {
"national": [
"WFC"
{
"interaction": {
"user": "datasift",
"id": "155505157",
"title": "Example",
"content": "JPMorgan Chase and Wells Fargo.",
"tag_tree": {
"banks": {
"national": {
"top10": [
@edstenson
edstenson / output
Last active December 28, 2015 21:19
{
"interaction": {
"content": "Check out my holiday pics, Venice was beautiful!",
"source": "Twitter for iPhone",
"tags": [
"iPhone",
"iOS"
]
}
}
[TAGS :iter = path_iterator(tag_tree)]
ID = interaction.id
PATH = :iter._path
VAL = :iter._value
{
"interaction": {
"tag_tree": {
"skills": {
"programming": [
"php",
"nodejs",
"java"
],
"databases": [
[ENTITIES :iter = objectlist_iterator(salience.entities)]
ID = interaction.id
TYPE = :iter.type
NAME = :iter.name
{
"salience": {
"entities": [
{
"type": "Person",
"name": "Larry Ellison"
},
{
"type": "Product",
"name": "Database"