{
  "fetched_at": "2026-10-19T11:50:12Z",
  "source_url": "https://www.kaggle.com/competitions/boolean-retrieval-homework-ir-2-itmo-spring-2020/data",
  "pages": [
    {
      "name": "rules",
      "content": "<p>\nYou need to:\n<ul>\n<li>Implement Boolean search using inverted index data structure</li>\n<li>Submit results to this Kaggle competition and beat the baseline score</li>\n<li>Implement your solution as a working python3 script named <i>hw2_boolean_search.py<i> and conforming to the interface specified by the example script (see Data section)</li>\n</ul>\n</p>\n<p>\nPlease send your scripts to the email mentioned in the course homepage.\n</p>\n<p>\nSolution scripts should be working in one of the standard Conda environments:\n</p>\n<p>\n<ul>\n<li>Windows: https://repo.anaconda.com/archive/Anaconda3-2019.10-Windows-x86_64.exe</li>\n<li>MasOS: https://repo.anaconda.com/archive/Anaconda3-2019.10-MacOSX-x86_64.pkg</li>\n<li>Linux: https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh</li>\n</ul>\n</p>\n<p>\nand will be run under the <i>timeout</i> utility with arguments:\n<pre>\n./timeout -s $MEMORY_LIMIT -t 10000 python3 hw2_boolean_search.py --queries_file=queries.numerate.txt --docs_file=docs.tsv --objects_file=objects.numerate.txt --submission_file=sample.submission.txt\n</pre>\n</p>\n<p>\nAll the input files could be found in the Data section of the competition.\n</p>\n<p>\nThe resulting file <i>submission.txt</i> should correspond to the example submission file <i>sample.submission.txt</i> and <b>should produce the same file that was submitted as a final solution</b>.\n</p>\n<p>\nTimeout utility is used in order to specify limits on your solution's time and memory requirements. You can easily download it by yourself using curl:\n<pre>\ncurl https://raw.githubusercontent.com/pshved/timeout/master/timeout > timeout\n</pre>\n</p>\n<p>\nBe default, MEMORY_LIMIT is set to 500000 (500 MB), but the script will also by run under limits of 100 and 30 MB. The limit is set on RSS (resident set size), not virtual memory (VIRT in `top`, VSZ in `ps` output)\n</p>\n<p>\nResults scoring:\n<ul>\n<li> Any solution beating baseline of <b>F1=0.60</b> will get <b>10 points</b>\n<li> If your solution still works under limit of <b>100 MB</b>, you will get <b>5 additional points</b>\n<li> Solution working under limit of <b>30 MB</b> will get you <b>5 more points</b>\n</ul>\n</p>\n",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "data-description",
      "content": "<p>Query and document texts are lemmatized, without stopwords</p>\n<p>Queries are serialized as trees, for example (JEEP|ДЖИП) (FORUM|ФОРУМ) means (JEEP OR ДЖИП) AND (FORUM OR ФОРУМ).</p>\n<p>In other words:\n<ul>\n<li>ORs are represented as |-separated lists, i.e. (TERM_A|TERM_B|...)</li>\n<li>ANDs are represented as whitespace-separated lists i.e. TERM_A TERM_B ...</li>\n</ul>\n</p>\n\n<h2>File descriptions</h2>\n<ul>\n<li><strong>docs.tsv</strong> - document texts, 3 tab-separated fields: DocumentId, Title Text, Body Text</li>\n<li><strong>queries.numerate.txt</strong> - list of queries, 2 tab-separated fields: QueryId, Query Tree</li>\n<li><strong>objects.numerate.txt</strong> - mapping of query and document ids to ObjectIds, 3 fields: ObjectId, QueryId,DocumentId</li>\n<li><strong>sample.submission.txt</strong> - a sample submission file in the correct format (ObjectId,Relevance)</li>\n<li><strong>hw2_boolean_search</strong> - an example solution script</li>\n</ul>",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "Description",
      "content": "<h2>Finding documents relevant with respect to the search query</h2>\n<p>When search engine receives a query, first of all it looks for a set of candidate documents that contain keywords from the query. Later these documents will be ranked and re-ranked so that eventually top-10 best documents will be presented to the user. The implementation of the first retrieval stage is usually based upon inverted index data structure.\n</p>\n<p>\nYou need to implement inverted index data structure and find documents matching Boolean search queries.\n</p>",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    },
    {
      "name": "Evaluation",
      "content": "<p>The evaluation metric for this competition is <a href=\"https://www.kaggle.com/wiki/MeanFScore\"> Mean F1-Score</a>. The F1 score, commonly used in information retrieval, measures accuracy using the statistics precision p and recall r. Precision is the ratio of true positives (tp) to all predicted positives (tp + fp). Recall is the ratio of true positives to all actual positives (tp + fn). The F1 score is given by:</p>\n<p>\\[ F1 = 2\\frac{p \\cdot r}{p+r}\\ \\ \\mathrm{where}\\ \\ p = \\frac{tp}{tp+fp},\\ \\ r = \\frac{tp}{tp+fn} \\]</p>\n<p>The F1 metric weights recall and precision equally, and a good retrieval algorithm will maximize both precision and recall simultaneously. Thus, moderately good performance on both will be favored over extremely good performance on one and poor performance on the other.</p>\n<h2>Submission Format</h2>\n<p>For every query and document pair you need to provide a class label: 1 if this document is relevant with respect to this query, 0 otherwise.</p>\n<p>The file should contain a header and have the following format:</p>\n<pre>QueryId,DocumentId<br />1,1,0<br /><span style=\"font-size: 14px; line-height: 1.4em;\">1,2,0<br />2,1,1<br /></span><span style=\"font-size: 14px; line-height: 1.4em;\">2,2,0<br /></span><span style=\"font-size: 14px; line-height: 1.4em;\">etc.</span></pre>",
      "isPublished": false,
      "hasIsPublished": false,
      "postTitle": "",
      "hasPostTitle": false,
      "mimeType": "",
      "hasMimeType": false
    }
  ]
}