Introduction

Some online social media objects such as YouTube videos include useful comments, but not all comments are useful due to the varying intentions of authors of comments. Therefore, the development of automated approaches for ranking comments and optimizing view- ers’ experience is becoming increasingly important. Available approaches tend to rely on particular sources of ground truth for predicting usefulness. However, use- fulness includes relevancy and personal interest and ac- cordingly varies from one individual user to another. This work, accordingly, proposes an adaptive faceted ranking framework which clusters each element of a comment along multiple explicit semantic facets (e.g., subjectivity, informative, and topics). This enables users to explore different clusters and select combinations of fact(s) in order to extract and rank comments that match their interests. A prototype of a Web-based interface im- plementation of the framework is developed which en- ables the evaluation of different ranking strategies and the proposed framework. We find that adaptive faceted ranking shows significant improvements over reverse- chronological ranking and reveals substantial benefits which include clustering each element of a comment along multiple explicit semantic facets rather than in a single topic or subjective facets.

How to Use

Local installation

Requirements:
Apache Tomcat Server and MongoDB database installation.

  • Download the current WAR-File of the backend here (Contact authors for Username / Password)
  • Deploy the WAR-File into a Tomcat Server
  • The System will use a database called "arws" and creates it with the first upload of a batch or the creation of a new user thru the API
  • Browse to http://yourdomain.com/amowa_api/batches. You should get a HTTP 200 Code and an empty JSON string

Creating a client

JAVA Code Examples
JAVA Examples can be found here.
Be sure to include Jersey Bundle 1.17 and Jersey Multipart 1.17


Quick MongoDB command line commands

Select database to work with

use <database>
Display all available collections
show collections
Select all entries (documents) from defined Collection
db.Collection.find()
Selects an entry (document) with _id = 51a7dc7b2cacf40b79990be6 of a defined Collection
db.Collection.find( {'_id': '51a7dc7b2cacf40b79990be6'} )



Public API

The API is currently in test mode and only available for testing after contacting the authors.
See the API Specification for usage details.
A working frontend demo can be found here: Frontend Demo

Specification

API

All requests except /login and /register may include BasicAuth Header params for (simple) user identification.
Password is encoded with Base64. Authentication is used with following string: "Basic username:base64encoded_password"

POST /register
Description:Registers for an user account
Arguments:username Desired Username (string)
password Desired Password (string)
Returns: The newly created User object
Object

  {
    id: "52ea31d5036472844d65bd99"
    password: "test123"
    username: "test"
  }
                    
Example:register.html
POST /login
Description:Logs in a user
Arguments:username (string)
password (string)
Returns: The User object
Object

  {
    id: "52ea31d5036472844d65bd99"
    password: "test123"
    username: "test"
  }
                    
Example:login.html
POST /batches
Description:Uploads a corpus of comments and creates a new batch to work with
Arguments:file XML File to upload (multipart/form-data)
Returns: The newly created Batch object
Object

  {
    id: "52ea239b036472844d65bd8f",
    version: "1",
    corpusId: "52ea2399036472844d65bd81",
    created: "2014-01-30T11:04:11.854+01:00",
    facets: [
      {
        count: "9999.0",
        facetId: "topic",
        minValue: "0.0",
        value: {
          {
            @type: "topics",
            values: [
              {
                count: "23.076923076923077",
                name: "Nixon"
              },
              {
                count: "7.6923076923076925",
                name: "president"
              }
        }
      },
      {
        count: "84.61538461538461",
        facetId: "subjectivityNormal",
        minValue: "0.0"
      },
      {
        count: "76.92307692307692",
        facetId: "affect",
        minValue: "0.0"
      },
    ],
    mediaUrl: "http://www.youtube.com/watch?v=e65XLPSDXD4",
    userId: "notlogged"
  }

                    
Field Description:corpusIdThe ID of the corpus the comments belong to
createdCreation date of the batch
facetsExtracted facets of the corpus
facets.countQuantity of the facet inside the corpus. Can be absolute or relative
facets.facetIdID of the facet
facets.minValueMinimum value of facet to become counted in the corpus (server side setting)
facets.mediaUrlURL of the media object
facets.userIdUserId of the user or notLogged for non authentificated users
Example:upload.html - arws-test.xml
GET /rankings
Description:Ranks a corpus of comments based on selected facet value pairs
Arguments:batchId ID of Batch (string)
fvpFacet Value Pairs (e.g: fvp=swear:0.0,affect:0.0,topic:nixon) (array)
limitOptional limit of max. comments within this ranking (integer)
Returns: A Ranking object
Object

  {
    id: "52f89eaa0364fb4b1a98e725",
    version: "1",
    batchId: "52f89c910364fb4b1a98e71e",
    comments: [
      {
        content: "I'm 51 now. Looking back on it now. I was 13 at the time. Nixon resigned over THIS stupid crapola? Help! I'm losing my country.",
        facets: [
          {
            facetId: "swear",
            value: "0.007518796992481203"
          },
          {
            facetId: "affect",
            value: "0.045112781954887216"
          },
          {
            facetId: "sad",
            value: "0.015037593984962405"
          },
          {
            facetId: "relig",
            value: "0.007518796992481203"
          },
          {
            facetId: "subjectivityNormal",
            value: "0.04"
          },
          {
            facetId: "topic",
            values: "Nixon"
          },
          {
            facetId: "informative",
            value: "1.0"
          }
        ],
        hasJudgement: "true",
        interesting: true,
        relevant: false,
        id: "40",
        myParent: {
          content: "yes i was 13 too",
          hasJudgement: "false"
        },
        _Id: "52f89c900364fb4b1a98e713"
      }
    ],
    created: "2014-02-10T10:40:58.464+01:00",
    fvp: [
      {
        facetId: "topic",
        value: "Nixon"
      },
    ],
    results: "1"
  }                  
                    
Field Description:batchIdThe ID of the batch the comments belong to
createdCreation date of the batch
commentsComments matching the Facet Value Pair selection
comments.$.content
comments.facets.$.facetIdID of the facet
comments.$.hasJudgementtrue or false if the comment has a judgement. New fields are created after a judgment (fields are: interesting or relevant. see next section GET /jugde)
comments.$.idID of the comment (as defined in XML file)
comments.$.myParentThe parent comment
createdCreation time of the ranking
fvpSelected Facet Value Pairs for this ranking
resultsResults of comments within this ranking
Example:ranking.html
GET /jugde
Description:Sets a judgment field and the desired value
Arguments:rankingId ID of ranking (string)
commentIdID of the comment (eg: 40) (integer)
fieldThe field to set (interesting or relevant) (string)
valuetrue or false (string)
Returns: Modified Ranking Object (see above)
Example:judge.html

Upload File Example

Structure:
<?xml version="1.0" encoding="UTF-8"?>
<MediaComments mediaUrl="http://www.youtube.com/watch?v=e65XLPSDXD4">

  <Comment id="38" author_id="1" created="1294862756119">
    <content>    Mostly because President Franklin D. Roosevelt realized that if prohibition was repealed, farmers could sell more grain; carpenters could build more kegs; breweries, distilleries and bars would re-open and employ more people; and the US Gov't could tax the liquors being produced and consumed (The USA was in a Depression then). FDR's first words after signing the 21st Amendment to the Constitution repealing prohibition were, ""Gentlemen, I believe this calls for a drink!    

    </content>
  </Comment>
  
  <Comment id="39" author_id="2" created="1294863656114" parent_id="38">
    <content> I wonder how many fewer abortions there would be if there wasn't any alcohol or drugs.  I think it would be a lot less.  Plus over half a million people have died in the past quarter century due to drunk driving in the US alone.     

</content>
  </Comment>

  <Comment id="40" author_id="3" created="">
    <content>Back in the old west cowboys sat around the fire at night they'd be pretty sore from being in the saddle all day herding cattle. Weed grew wild and all the locals (native Americans AND Mexicans) had been using marijuana for centuries. Honestly, don't you think the real cowboys used to smoke weed just to take the aches and pains out of their bones?  Most traveling medicine wagons sold tonics high in opiate content. Tonics were used for most everything.     

    </content>
  </Comment>

</MediaComments>
Field Description:MediaComments - Attribute: mediaUrlURL of media object
Comment - Attribute: idID of the comment
Comment - Attribute: createdTimestamp of creation date
Comment - Attribute: author_idID of the comment creator
Comment - Attribute: parent_idReference to id of parent comment (for conversational tree)
Comment - contentThe comment
Example:arws-test.xml

About the Authors

Elaheh Momeni, University of Vienna
Simon Braendle, University of Vienna