<commit_before><html>
<head>
  <title>Aggie API Explorer</title>
  <link href="explorer.css" rel="stylesheet" type="text/css">
  <script type="text/javascript" src="lib/jquery-2.1.0.min.js"></script>
  <script type="text/javascript" src="lib/underscore-1.6.0.min.js"></script>
  <script type="text/javascript" src="lib/backbone-1.1.2.min.js"></script>
  <script type="text/javascript" src="lib/toolbox-base.js"></script>
  <script type="text/javascript" src="lib/jquery.serialize-hash.js"></script>
  <script type="text/javascript" src="../shared/user.js"></script>
  <script type="text/javascript" src="../client/user.js"></script>
  <script type="text/javascript" src="request_handler.js"></script>
  <script type="text/javascript" src="basic_request_handler.js"></script>
  <script type="text/javascript" src="form_request_handler.js"></script>
  <script type="text/javascript" src="request_definition_loader.js"></script>
  <script type="text/javascript" src="/socket.io/socket.io.js"></script>
  <script type="text/javascript" src="socket_handler.js"></script>
</head>
<body>
  <h1>Aggie API Explorer</h1>
  <h2>Request</h2>
  <ul id="requests">
    <li>
      <form action="/login" method="post">
        Login
        <input type="text" name="username" />
        <input type="password" name="password" />
        <input type="submit" value="Login">
      </form>
    </li>
    <li>
      <form action="/reset-password" method="post">
        Forgot password. Enter email address:
        <input type="text" name="email" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/reset-password" method="put">
        Reset password. Paste token and enter new password:
        <input type="text" name="token" />
        <input type="password" name="password" />
        <input type="submit">
      </form>
    </li>
    <li>
      <a href="/logout">Logout</a>
    </li>
    <li>
      <form action="/api/v1/source" method="post">
        <input type="hidden" name="type" value="twitter" />
        <input type="hidden" name="enabled" value="true" />
        Create Twitter source with keywords (e.g. banana,apple):
        <input type="text" name="nickname" placeholder="Nickname" />
        <input type="text" name="keywords" placeholder="Keywords" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/api/v1/source" method="post">
        <input type="hidden" name="type" value="rss" />
        <input type="hidden" name="enabled" value="true" />
        Create RSS source with a URL:
        <input type="text" name="nickname" placeholder="Nickname" />
        <input type="text" name="url" placeholder="Feed URL" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/api/v1/source" method="post">
        <input type="hidden" name="type" value="elmo" />
        <input type="hidden" name="enabled" value="true" />
        Create ELMO source with a URL:
        <input type="text" name="nickname" placeholder="Nickname" />
        <input type="text" name="url" placeholder="ELMO URL" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form id="reportQuery" action="/api/v1/report" method="get">
        Search for Report data:
        <input type="text" name="keywords" placeholder="Keywords" />
        Status:
        <select name="status">
          <option value="">- Status -</option>
          <option value="relevant">Relevant</option>
          <option value="irrelevant">Irrelevant</option>
          <option value="assigned">Assigned</option>
          <option value="unassigned">Unassigned</option>
        </select>
        <input type="text" name="after" placeholder="After (date)" />
        <input type="text" name="before" placeholder="Before (date)" />
        <select name="sourceType">
          <option value="">- Source Type -</option>
          <option value="twitter">Twitter</option>
          <option value="rss">RSS</option>
        </select>
        <input type="text" name="sourceId" placeholder="Source ID" />
        <input type="text" name="incidentId" placeholder="Incident ID" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/api/v1/trend" method="post">
        Analyze Trend data:
        <input type="text" name="keywords" placeholder="Keywords" />
        <select name="sourceType">
          <option value="">- Source Type -</option>
          <option value="twitter">Twitter</option>
          <option value="rss">RSS</option>
        </select>
        <input type="text" name="sourceId" placeholder="Source ID" />
        <input type="text" name="incidentId" placeholder="Incident ID" />
        <input type="submit">
      </form>
    </li>
    <li>
      Create new user:
      <form action="/api/v1/user" method="post">
        Email
        <input type="text" name="email" />
        Username
        <input type="text" name="username" />
        Password
        <input type="password" name="password" />
        Role
        <select name="role">
          <option value="viewer">Viewer</option>
          <option value="monitor">Monitor</option>
          <option value="manager">Manager</option>
          <option value="admin">Admin</option>
        </select>
        <input type="submit">
      </form>
    </li>
    <li>
      <a href="/api/v1/user">List users</a>
    </li>
    <li>
      <a href="/api/v1/source">List sources</a>
    </li>
    <li>
      <a href="/api/v1/report">List reports</a>
    </li>
    <li>
      <a href="/api/v1/trend">List trends</a>
    </li>
    <li>
      <a href="/api/v1/incident">List incidents</a>
    </li>
    <li>
      <a href="/api/v1/source/_all" data-method="delete">Delete all sources</a>
    </li>
    <li>
      <a href="/api/v1/report/_all" data-method="delete">Delete all reports</a>
    </li>
    <li>
      <a href="/api/v1/trend/_all" data-method="delete">Delete all trends</a>
    </li>
    <li>
      <a href="/api/v1/incident/_all" data-method="delete">Delete all incidents</a>
    </li>
    <li>
      <a href="/api/v1/fetching">Check fetching status</a>
    </li>
    <li>
      <a href="/api/v1/fetching/on" data-method="put">Enable fetching</a>
    </li>
    <li>
      <a href="/api/v1/fetching/off" data-method="put">Disable fetching</a>
    </li>
    <li>
      <a href="/session">Get session data</a>
    </li>
  </ul>
  <h2>Response</h2>
  <div id="status"></div>
  <div id="stream-wrapper">
    <h2>Stream</h2>
    <div id="stream"></div>
  </div>
  <pre id="response">
[No request sent yet.]
  </pre>

  <script type="text/javascript">
    $(document).ready(function(){
      new RequestDefinitionLoader('#requests');
    });
  </script>
</body>
</html>
<commit_msg>Add ELMO form elements to API explorer<commit_after><html>
<head>
  <title>Aggie API Explorer</title>
  <link href="explorer.css" rel="stylesheet" type="text/css">
  <script type="text/javascript" src="lib/jquery-2.1.0.min.js"></script>
  <script type="text/javascript" src="lib/underscore-1.6.0.min.js"></script>
  <script type="text/javascript" src="lib/backbone-1.1.2.min.js"></script>
  <script type="text/javascript" src="lib/toolbox-base.js"></script>
  <script type="text/javascript" src="lib/jquery.serialize-hash.js"></script>
  <script type="text/javascript" src="../shared/user.js"></script>
  <script type="text/javascript" src="../client/user.js"></script>
  <script type="text/javascript" src="request_handler.js"></script>
  <script type="text/javascript" src="basic_request_handler.js"></script>
  <script type="text/javascript" src="form_request_handler.js"></script>
  <script type="text/javascript" src="request_definition_loader.js"></script>
  <script type="text/javascript" src="/socket.io/socket.io.js"></script>
  <script type="text/javascript" src="socket_handler.js"></script>
</head>
<body>
  <h1>Aggie API Explorer</h1>
  <h2>Request</h2>
  <ul id="requests">
    <li>
      <form action="/login" method="post">
        Login
        <input type="text" name="username" />
        <input type="password" name="password" />
        <input type="submit" value="Login">
      </form>
    </li>
    <li>
      <form action="/reset-password" method="post">
        Forgot password. Enter email address:
        <input type="text" name="email" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/reset-password" method="put">
        Reset password. Paste token and enter new password:
        <input type="text" name="token" />
        <input type="password" name="password" />
        <input type="submit">
      </form>
    </li>
    <li>
      <a href="/logout">Logout</a>
    </li>
    <li>
      <form action="/api/v1/source" method="post">
        <input type="hidden" name="type" value="twitter" />
        <input type="hidden" name="enabled" value="true" />
        <input type="hidden" name="nickname" value="Twitter Search" />
        Create Twitter source with keywords (e.g. banana,apple):
        <input type="text" name="keywords" placeholder="Keywords" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/api/v1/source" method="post">
        <input type="hidden" name="type" value="facebook" />
        <input type="hidden" name="enabled" value="true" />
        Create Facebook source (e.g. http://www.facebook.com/georgiatech):
        <input type="text" name="nickname" placeholder="Nickname" />
        <input type="text" name="url" placeholder="URL" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/api/v1/source" method="post">
        <input type="hidden" name="type" value="elmo" />
        <input type="hidden" name="enabled" value="true" />
        Create ELMO source (e.g. https://secure1.sassafras.coop/api/v1/responses.json?form_id=XXX):
        <input type="text" name="nickname" placeholder="Nickname" />
        <input type="text" name="url" placeholder="URL" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/api/v1/source" method="post">
        <input type="hidden" name="type" value="rss" />
        <input type="hidden" name="enabled" value="true" />
        Create RSS source with a URL:
        <input type="text" name="nickname" placeholder="Nickname" />
        <input type="text" name="url" placeholder="Feed URL" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form id="reportQuery" action="/api/v1/report" method="get">
        Search for Report data:
        <input type="text" name="keywords" placeholder="Keywords" />
        Status:
        <select name="status">
          <option value="">- Status -</option>
          <option value="relevant">Relevant</option>
          <option value="irrelevant">Irrelevant</option>
          <option value="assigned">Assigned</option>
          <option value="unassigned">Unassigned</option>
        </select>
        <input type="text" name="after" placeholder="After (date)" />
        <input type="text" name="before" placeholder="Before (date)" />
        <select name="sourceType">
          <option value="">- Source Type -</option>
          <option value="twitter">Twitter</option>
          <option value="facebook">Facebook</option>
          <option value="elmo">ELMO</option>
          <option value="rss">RSS</option>
        </select>
        <input type="text" name="sourceId" placeholder="Source ID" />
        <input type="text" name="incidentId" placeholder="Incident ID" />
        <input type="submit">
      </form>
    </li>
    <li>
      <form action="/api/v1/trend" method="post">
        Analyze Trend data:
        <input type="text" name="keywords" placeholder="Keywords" />
        <select name="sourceType">
          <option value="">- Source Type -</option>
          <option value="twitter">Twitter</option>
          <option value="facebook">Facebook</option>
          <option value="elmo">ELMO</option>
          <option value="rss">RSS</option>
        </select>
        <input type="text" name="sourceId" placeholder="Source ID" />
        <input type="text" name="incidentId" placeholder="Incident ID" />
        <input type="submit">
      </form>
    </li>
    <li>
      Create new user:
      <form action="/api/v1/user" method="post">
        Email
        <input type="text" name="email" />
        Username
        <input type="text" name="username" />
        Password
        <input type="password" name="password" />
        Role
        <select name="role">
          <option value="viewer">Viewer</option>
          <option value="monitor">Monitor</option>
          <option value="manager">Manager</option>
          <option value="admin">Admin</option>
        </select>
        <input type="submit">
      </form>
    </li>
    <li>
      <a href="/api/v1/user">List users</a>
    </li>
    <li>
      <a href="/api/v1/source">List sources</a>
    </li>
    <li>
      <a href="/api/v1/report">List reports</a>
    </li>
    <li>
      <a href="/api/v1/trend">List trends</a>
    </li>
    <li>
      <a href="/api/v1/incident">List incidents</a>
    </li>
    <li>
      <a href="/api/v1/source/_all" data-method="delete">Delete all sources</a>
    </li>
    <li>
      <a href="/api/v1/report/_all" data-method="delete">Delete all reports</a>
    </li>
    <li>
      <a href="/api/v1/trend/_all" data-method="delete">Delete all trends</a>
    </li>
    <li>
      <a href="/api/v1/incident/_all" data-method="delete">Delete all incidents</a>
    </li>
    <li>
      <a href="/api/v1/fetching">Check fetching status</a>
    </li>
    <li>
      <a href="/api/v1/fetching/on" data-method="put">Enable fetching</a>
    </li>
    <li>
      <a href="/api/v1/fetching/off" data-method="put">Disable fetching</a>
    </li>
    <li>
      <a href="/session">Get session data</a>
    </li>
  </ul>
  <h2>Response</h2>
  <div id="status"></div>
  <div id="stream-wrapper">
    <h2>Stream</h2>
    <div id="stream"></div>
  </div>
  <pre id="response">
[No request sent yet.]
  </pre>

  <script type="text/javascript">
    $(document).ready(function(){
      new RequestDefinitionLoader('#requests');
    });
  </script>
</body>
</html>

{'fraction_non_alphanumeric': 0.18996693168226272, 'fraction_numerical': 0.005136142967705622, 'mean_word_length': 2.725819134993447, 'pattern_counts': {'":': 0, '<': 464, '<?xml version=': 0, '>': 464, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7360742', 'n_tokens_mistral': 4571, 'n_tokens_neox': 4508, 'n_words': 934}