Package

spacro

tasks

Permalink

package tasks

Provides classes for managing tasks on Mechanical Turk.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. tasks
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class HITManager[Prompt, Response] extends Actor

    Permalink

    Manages a particular kind of task; corresponds to a single TaskSpecification / HIT Type.

    Manages a particular kind of task; corresponds to a single TaskSpecification / HIT Type. In here will be all of the logic related to how to review HITs, do quality control, keep track of auxiliary data, schedule which HITs should be uploaded when, etc.

  2. sealed trait HeartbeatingWebSocketMessage[+A] extends AnyRef

    Permalink
  3. class NumAssignmentsHITManager[Prompt, Response] extends HITManager[Prompt, Response] with StrictLogging

    Permalink

    Simplest HIT manager, which gets a fixed number of assignments for every prompt and approves all assignments immediately.

    Simplest HIT manager, which gets a fixed number of assignments for every prompt and approves all assignments immediately. NOTE: this will crash if you try to have > 100 assignments per HIT. could possibly be fixed but seems not necessary since that's a kind of ridic use case.

  4. case class ProductionTaskConfig(projectName: String, serverDomain: String, interface: String, httpPort: Int, httpsPort: Int, hitDataService: HITDataService) extends TaskConfig with Product with Serializable

    Permalink

    Complete configuration for running on production.

  5. trait ResponseRW[Request <: AnyRef { type Response }] extends ResponseReader[Request] with ResponseWriter[Request]

    Permalink
  6. trait ResponseReader[Request <: AnyRef { type Response }] extends AnyRef

    Permalink
  7. trait ResponseWriter[Request <: AnyRef { type Response }] extends AnyRef

    Permalink
  8. case class SandboxTaskConfig(projectName: String, serverDomain: String, interface: String, httpPort: Int, httpsPort: Int, hitDataService: HITDataService) extends TaskConfig with Product with Serializable

    Permalink

    Complete configuration for running on the sandbox.

  9. class Server extends StrictLogging

    Permalink

    Takes a list of TaskSpecifications and hosts an HTTP server that can serve them all concurrently.

    Takes a list of TaskSpecifications and hosts an HTTP server that can serve them all concurrently. Requires a file application.conf in your resources folder with requisite fields defining the interface and ports (see the file in the sample project for reference). For testing, HTTP is fine, but if you want to run on MTurk, you need HTTPS to work. For this, you need (also in your resources folder) a globally trusted SSL certificate, a PKCS12-formatted keystore named <domain>.p12, a password named <domain>-keystore-password.

    Starts upon construction.

  10. trait Service[Request <: AnyRef { type Response }] extends AnyRef

    Permalink
  11. case class SetNumHITsActive(value: Int) extends Product with Serializable

    Permalink
  12. sealed trait TaskConfig extends AnyRef

    Permalink

    Contains the global configuration of our usage of the MTurk API, including relevant values (URLs, API hooks) and whether we are running on production or in the sandbox.

  13. class TaskManager[Prompt, Response] extends Actor with StrictLogging

    Permalink

    Actor that behaves as an endpoint for interfacing with the task through the SBT console.

    Actor that behaves as an endpoint for interfacing with the task through the SBT console. The hit manager (ActorRef) passed into the constructor needs to be the one associated with the helper object passed into the constructor.

  14. sealed trait TaskSpecification extends AnyRef

    Permalink

    Specifies a kind of task to run on MTurk.

    Specifies a kind of task to run on MTurk.

    The code defining an individual task type will be here. An instance of this class will correspond to a single HIT Type ID, which is Mechanical Turk's way of categorizing HITs uploaded to the system. This specifies the method to convert from Prompts (as in, the type parameter seen all over this project) into XML strings that are POSTed to the MTurk API as questions shown to annotators. It also has a method for converting from annotator responses (also XML strings) into Responses.

    To implement the actual logic & interface of a task, the work is done in the client-side code.

    TaskSpecification is also responsible for holding HIT Type ID of its HIT Type.

  15. case class WebSocketMessage[A](content: A) extends HeartbeatingWebSocketMessage[A] with Product with Serializable

    Permalink
  16. class Webservice extends Directives with StrictLogging

    Permalink

    Implements the logic of the web server that hosts the given MTurk tasks.

    Implements the logic of the web server that hosts the given MTurk tasks. Each TaskSpecification has its own Flow that specifies how to respond to WebSocket messages from clients. This web service hosts the JS code that clients GET, and delegates Websocket messages to their tasks' flows.

    It also hosts a sample version of each task at http(s)://<domain>:<port>/task/<task key>/preview.

Value Members

  1. object FieldLabels

    Permalink
  2. object HITManager

    Permalink
  3. object Heartbeat extends HeartbeatingWebSocketMessage[Nothing] with Product with Serializable

    Permalink
  4. object HeartbeatingWebSocketMessage

    Permalink
  5. object NumAssignmentsHITManager

    Permalink
  6. object Service

    Permalink
  7. object TaskConfig

    Permalink
  8. object TaskManager

    Permalink
  9. object TaskPage

    Permalink

    Contains the general HTML template for all tasks.

  10. object TaskSpecification

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped