Par4Sem

Par4Sim

Par4Sem

Installation

Demo

You can access the demo, which is based on the dataset we have collected during the experiment here. To simulate that you are accessing it from MTurk interface for different HITs (so that you can see different HITs), click Get new text

MTurk specific installation (for the COLING 2018 Par4Sim paper)

To setup the tool in MtUrk follow the following instruction. You have to first install Docker and docker-compose.

  1. Download the docker-compose file from here.
  2. Download the database dump from here, unzip and put them under dumps folder
  3. Start the docker as docker-compose up -d

Now, the tool is ready to be integrated to the MTurk website.

Accessing the databases:

  1. Login to the running mariadb in the docker.
    1. Get the container id: docker ps
    2. Login to the database docker exec -it CONTAINERID bash
  2. You can put dumps of your own under the dumps folder and import it as the docker starts.

How to embed the tool into MTurk?

The demo works with the CWI dataset to highlight complex phrases. If you like to use your own CWI database, make sure to populate cwi database first.

Here, we show how to embed Par4Sim into MTurk using the Java MTurk SDK

For the MTruk Sandbox:

 String question ="<ExternalQuestion xmlns=\"http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd\">\n" + 
			         "  <ExternalURL>https://YOUR/ADDRESS:PORT/par4sim/?host=https://workersandbox.mturk.com/mturk/externalSubmit</ExternalURL>\n" + 
			         "  <FrameHeight>900</FrameHeight>\n" + 
			         "</ExternalQuestion>"; 

For the MTruk:

 String question ="<ExternalQuestion xmlns=\"http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd\">\n" + 
		                     "  <ExternalURL>https://YOUR/ADDRESS:PORT/par4sim/?host=https://www.mturk.com/mturk/externalSubmit</ExternalURL>\n" + 
		                     "  <FrameHeight>900</FrameHeight>\n" + 
		                     "</ExternalQuestion>";

https://YOUR/ADDRESS:PORT is the public server address where Par4Sim is hosted.

     HIT hit = service2.createHIT(null,
	                 title, description, keywords, question, reward, ASSIGNMENT_DURATION_IN_SECONDS,
	                 AUTO_APPROVAL_DELAY_IN_SECONDS, LIFETIME_IN_SECONDS, numAssignments, null, rs, null);

At this point, you need to store the hitId (hit.getHITId()) along the the text in the Par4Sim database.

Here is how we define the Qualification requirements rs

   QualificationRequirement[] rs =  new QualificationRequirement[] { nApproved, pApproved };

The Qualification requirement nApproved and pApproved are defined as follows

 QualificationRequirement  nApproved = r = new QualificationRequirement();
		r.setQualificationTypeId("00000000000000000040");
		r.setRequiredToPreview(false);
		r.setComparator(Comparator.GreaterThanOrEqualTo);
		r.setIntegerValue(new int[] { 10000 });

		QualificationRequirement pApproved = new QualificationRequirement();
		r.setQualificationTypeId("000000000000000000L0");
		r.setRequiredToPreview(false);
		r.setComparator(Comparator.GreaterThanOrEqualTo);
		r.setIntegerValue(new int[] { 96 }

Do you like to see generic adaptive paraphrasing for semantic-aware writing aid tool? check here

For the general installation instruction, please refer Par4Sem installation