#{extends 'main.html' /}
#{set title:'DUALIST: Experiment' /}

<div id="setup">

<h1>Experiment Mode</h1>

<p>Load a labeled data set (see README.txt for data formatting details) and experiment with various labeling interfaces for training a model against a benchmark corpus. If a test set is supplied, it must be labeled, and the training set may be unlabeled. If only a training set is supplied, it must be labeled and a train (90%) / test (10%) split will be created automatically.</p>
 
#{if flash.error}
    <p style="color:#c00">
        ${flash.error}
    </p>
#{/if}

<form action="@{Application.setupExperiment()}" method="post" accept-charset="utf-8" enctype="multipart/form-data">

<table>
    <tr>
        <td><strong>Your Name:</strong></td>
        <td><input type="text" name="username" value="${username}" id="username"/></td>
    </tr>
    <tr>
        <td><strong>Training Set:</strong></td>
        <td><input type="file" id="trainFile" name="trainFile" /> (may be unlabeled if test set supplied)</td>
    </tr>
    <tr>
        <td><strong>Test Set:</strong></td>
        <td><input type="file" id="testFile" name="testFile" /> (optional, must be labeled)</td>
    </tr>
    <tr>
        <td><strong>Data Type:</strong></td>
        <td>
            <input checked="checked" type="radio" name="type" value="document" id="type_text"><label for="type_text">Documents</label>
            <input type="radio" name="type" value="simple" id="type_simple"><label for="type_simple">Simple Lines</label>
            <input type="radio" name="type" value="twitter" id="type_twitter"><label for="type_twitter">Tweets</label>
            <input type="radio" name="type" value="entity" id="type_entity"><label for="type_entity">Entities</label>
        </td>
    </tr>
    <tr>
        <td><strong>Annotation Mode:</strong></td>
        <td>
            <input checked="checked" type="radio" name="mode" value="dual" id="mode_dual"><label for="mode_dual">Dual Active</label>
            <input type="radio" name="mode" value="inst" id="mode_inst"><label for="mode_inst">Active (Instances)</label>
            <input type="radio" name="mode" value="passive" id="mode_passive"><label for="mode_passive">Passive (Instances)</label>
        </td>
    </tr>
    <tr>
        <td><strong>Duration (Minutes):</strong></td>
        <td><input size="2" type="text" name="numMinutes" value="10" id="numMinutes"/></td>
    </tr>
    <tr>
        <td><strong># Instances Queries:</strong></td>
        <td><input size="2" type="text" name="numInstances" value="10" id="numInstances"/></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td><input type="submit" value="Start the Experiment!"/></td>
    </tr>
</table>

</form>

</div>