Natural language version of activities in Shindig

2014-12-01 Thread René Peinl
Dear Shindig community,

we are facing a challange in our project, that we are using Shindig to
collect activities from various systems and want to show activities coming
from Shindig in every system. Currently Shindig only delivers the basic
activity data like activity verb, object, target and so on. However, we’d
like to show a natural language version of the activity in the activity
stream (full sentence) which includes multi-lingual presentation of the
contents. An example would be „actor has added a comment to object“ or
„actor renamed document object into target“. The activitystrea.ms
standard specifies the title attribute for that purpose. 

 http://activitystrea.ms/specs/json/1.0/#activity
http://activitystrea.ms/specs/json/1.0/#activity

In Shindig this attribute attribute is present and handled, but only in a
pass-through manner. 

 

In order to avoid duplication of code, our natural choice would be to extend
Shindig to generate the natural language version of the activities in the
title attribute, if title is not present in the database. We would use files
for translation and formatting templates (only string formatting, not
colouring or layout), so that every administrator can influence both without
any coding. 

 

Would this be an interesting extension for the Shindig base system and do
you have any suggestions on how to integrate such an extension from an
architecture point of view? We are e.g. not sure whether to deliver several
translation in the same JSON as shown here

 
http://www.w3.org/TR/2014/WD-activitystreams-core-20141023/#naturalLanguage
Values
http://www.w3.org/TR/2014/WD-activitystreams-core-20141023/#naturalLanguageV
alues

or use a parameter from the client to choose the language. 

My guess would be that other people will face similar problems.

 

Regards

René

 



Re: Review Request 28534: gadget ifr servlet not able to refresh gadget xml as desired

2014-12-01 Thread Ryan Baxter

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28534/#review63379
---


My thoughts still apply to this, I think the API changes are not suitable for a 
point release.

- Ryan Baxter


On Nov. 29, 2014, 7:43 a.m., Jiaqing Guo wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/28534/
 ---
 
 (Updated Nov. 29, 2014, 7:43 a.m.)
 
 
 Review request for shindig.
 
 
 Bugs: SHINDIG-1888
 https://issues.apache.org/jira/browse/SHINDIG-1888
 
 
 Repository: shindig
 
 
 Description
 ---
 
 Copied from https://reviews.apache.org/r/10467/
 Shindig ifr servlet entry will send the default cache control of gadget xml 
 to the browser as a year by default. This is not reasonable especially when 
 gadget xml resource server specified the cache control in its response to 
 Shindig server, and consumer need to dynamically create the gadget xml 
 content.
 
 In the HttpCache of Shindig server, the gadget xml and its response are 
 stored. The desired behavior would be to let the ifr servlet being able to 
 refresh itself so the data in HttpCache can be validated, so a refetching of 
 gadget xml can happen.
 
 
 Diffs
 -
 
   
 http://svn.apache.org/repos/asf/shindig/trunk/content/containers/commoncontainer/GadgetXMLResponseWithCacheControl.jsp
  PRE-CREATION 
   
 http://svn.apache.org/repos/asf/shindig/trunk/content/containers/commoncontainer/gadgetCollections.json
  1500152 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/AbstractSpecFactory.java
  1372695 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultGadgetSpecFactory.java
  1383189 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/DefaultMessageBundleFactory.java
  1364210 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/Gadget.java
  1364210 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/http/AbstractHttpCache.java
  1490276 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/http/HttpResponseBuilder.java
  1454767 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/process/Processor.java
  1372888 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/Renderer.java
  1452056 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/render/RenderingResults.java
  1293966 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetRenderingServlet.java
  1364210 
   
 http://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/test/java/org/apache/shindig/gadgets/http/AbstractHttpCacheTest.java
  1490276 
 
 Diff: https://reviews.apache.org/r/28534/diff/
 
 
 Testing
 ---
 
 Done
 
 
 Thanks,
 
 Jiaqing Guo
 




AW: Natural language version of activities in Shindig

2014-12-01 Thread René Peinl
Dear Ryan,
Sorry that my description was not precise enough. 
What I want to achieve is: store actor, verb, object, and target of an 
activity in Shindig and when retrieving the activity get a JSON that delivers 
the stored values and in addition includes the title attribute with something 
like 
{ 
   language: en,
   title:actor renamed document object into target
}
Shindig should use a lookup table that has a natural language template per 
activity verb.

With real data instead of placeholders this would look like
{
   language: en,
   title: Peter renamed document 'meeting protocol2.pdf' into 'meeting 
protocol for second project review.pdf'
}

I hope that helps. If not, please try to rephrase what you understood, so that 
I can see where exactly the problem with understanding is.
Regards
René

-Ursprüngliche Nachricht-
Von: Ryan Baxter [mailto:rbaxte...@gmail.com] 
Gesendet: Montag, 1. Dezember 2014 17:18
An: dev@shindig.apache.org
Cc: Florian Holzschuher; Christian Ochsenkühn
Betreff: Re: Natural language version of activities in Shindig

Hi Rene,

Can you provide a more concrete example of what you are trying to do?
I am having a hard time grasping your question.

On Mon, Dec 1, 2014 at 7:47 AM, René Peinl rene.pe...@hof-university.de wrote:
 Dear Shindig community,

 we are facing a challange in our project, that we are using Shindig to 
 collect activities from various systems and want to show activities 
 coming from Shindig in every system. Currently Shindig only delivers 
 the basic activity data like activity verb, object, target and so on. 
 However, we’d like to show a natural language version of the activity 
 in the activity stream (full sentence) which includes multi-lingual 
 presentation of the contents. An example would be „actor has added a 
 comment to object“ or „actor renamed document object into 
 target“. The activitystrea.ms standard specifies the title attribute for 
 that purpose.

  http://activitystrea.ms/specs/json/1.0/#activity
 http://activitystrea.ms/specs/json/1.0/#activity

 In Shindig this attribute attribute is present and handled, but only 
 in a pass-through manner.



 In order to avoid duplication of code, our natural choice would be to 
 extend Shindig to generate the natural language version of the 
 activities in the title attribute, if title is not present in the 
 database. We would use files for translation and formatting templates 
 (only string formatting, not colouring or layout), so that every 
 administrator can influence both without any coding.



 Would this be an interesting extension for the Shindig base system and 
 do you have any suggestions on how to integrate such an extension from 
 an architecture point of view? We are e.g. not sure whether to deliver 
 several translation in the same JSON as shown here


 http://www.w3.org/TR/2014/WD-activitystreams-core-20141023/#naturalLa
 nguage
 Values
 http://www.w3.org/TR/2014/WD-activitystreams-core-20141023/#naturalLan
 guageV
 alues

 or use a parameter from the client to choose the language.

 My guess would be that other people will face similar problems.



 Regards

 René






Re: Natural language version of activities in Shindig

2014-12-01 Thread Ryan Baxter
Makes sense Rene thanks.  But what I don't understand is how you
propose Shindig be able to translate the activity, would the app
creating the activity provide the translation?

On Mon, Dec 1, 2014 at 12:57 PM, René Peinl
rene.pe...@hof-university.de wrote:
 Dear Ryan,
 Sorry that my description was not precise enough.
 What I want to achieve is: store actor, verb, object, and target of 
 an activity in Shindig and when retrieving the activity get a JSON that 
 delivers the stored values and in addition includes the title attribute with 
 something like
 {
language: en,
title:actor renamed document object into target
 }
 Shindig should use a lookup table that has a natural language template per 
 activity verb.

 With real data instead of placeholders this would look like
 {
language: en,
title: Peter renamed document 'meeting protocol2.pdf' into 'meeting 
 protocol for second project review.pdf'
 }

 I hope that helps. If not, please try to rephrase what you understood, so 
 that I can see where exactly the problem with understanding is.
 Regards
 René

 -Ursprüngliche Nachricht-
 Von: Ryan Baxter [mailto:rbaxte...@gmail.com]
 Gesendet: Montag, 1. Dezember 2014 17:18
 An: dev@shindig.apache.org
 Cc: Florian Holzschuher; Christian Ochsenkühn
 Betreff: Re: Natural language version of activities in Shindig

 Hi Rene,

 Can you provide a more concrete example of what you are trying to do?
 I am having a hard time grasping your question.

 On Mon, Dec 1, 2014 at 7:47 AM, René Peinl rene.pe...@hof-university.de 
 wrote:
 Dear Shindig community,

 we are facing a challange in our project, that we are using Shindig to
 collect activities from various systems and want to show activities
 coming from Shindig in every system. Currently Shindig only delivers
 the basic activity data like activity verb, object, target and so on.
 However, we’d like to show a natural language version of the activity
 in the activity stream (full sentence) which includes multi-lingual
 presentation of the contents. An example would be „actor has added a
 comment to object“ or „actor renamed document object into
 target“. The activitystrea.ms standard specifies the title attribute for 
 that purpose.

  http://activitystrea.ms/specs/json/1.0/#activity
 http://activitystrea.ms/specs/json/1.0/#activity

 In Shindig this attribute attribute is present and handled, but only
 in a pass-through manner.



 In order to avoid duplication of code, our natural choice would be to
 extend Shindig to generate the natural language version of the
 activities in the title attribute, if title is not present in the
 database. We would use files for translation and formatting templates
 (only string formatting, not colouring or layout), so that every
 administrator can influence both without any coding.



 Would this be an interesting extension for the Shindig base system and
 do you have any suggestions on how to integrate such an extension from
 an architecture point of view? We are e.g. not sure whether to deliver
 several translation in the same JSON as shown here


 http://www.w3.org/TR/2014/WD-activitystreams-core-20141023/#naturalLa
 nguage
 Values
 http://www.w3.org/TR/2014/WD-activitystreams-core-20141023/#naturalLan
 guageV
 alues

 or use a parameter from the client to choose the language.

 My guess would be that other people will face similar problems.



 Regards

 René