{
    "componentChunkName": "component---src-templates-docs-js",
    "path": "/assignments/a3",
    "result": {"data":{"site":{"siteMetadata":{"title":"Linnaeus University","language":"en"}},"mdx":{"fields":{"id":"60b237bb-d61d-5911-97c2-acb15f444f38","title":"A3 - Search Engine","slug":"/assignments/a3"},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"A3 - Search Engine\",\n  \"metaTitle\": \"2DV515 | A3\",\n  \"metaDescription\": \"metaDescription\",\n  \"order\": 3\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar Hint = makeShortcode(\"Hint\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"h2\", null, \"Description\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"In this assignment, you shall implement a basic search engine for Wikipedia articles.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"You can use any programming language you like.\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"You shall present your application and code at an oral examination.\")), mdx(\"h2\", null, \"Submission instructions\"), mdx(\"p\", null, \"See the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"../study-guide/deadlines-and-submissions\"\n  }, \"Deadlines and Submissions\"), \" page.\"), mdx(\"h2\", null, \"Requirements\"), mdx(\"table\", null, mdx(\"tr\", null, mdx(\"th\", null, \"Grade\"), mdx(\"th\", null, \"Requirements\")), mdx(\"tr\", null, mdx(\"td\", null, \"E\"), mdx(\"td\", null, mdx(\"ul\", null, mdx(\"li\", null, \"Implement a basic search engine that index all pages in the \", mdx(\"em\", null, \"Wikipedia\"), \" dataset (see \", mdx(\"a\", {\n    href: \"datasets\"\n  }, \"Datasets\"), \" page).\"), mdx(\"li\", null, \"Search queries shall only contain single words.\"), mdx(\"li\", null, \"Results shall be ranked using the word frequency metric.\"), mdx(\"li\", null, \"The user shall input the search queries in a web client, and display the search results returned from the server.\"), mdx(\"li\", null, \"Display the top 5 search results with page and rank score.\"), mdx(\"li\", null, \"Implement the system using a REST web service where:\", mdx(\"ol\", null, mdx(\"li\", null, \"client sends a request to a server.\"), mdx(\"li\", null, \"the server responds with \", mdx(\"em\", null, \"json\"), \" data.\"), mdx(\"li\", null, \"the \", mdx(\"em\", null, \"json\"), \" data is decoded and presented in a client GUI.\")))))), mdx(\"tr\", null, mdx(\"td\", null, \"C-D\"), mdx(\"td\", null, mdx(\"ul\", null, mdx(\"li\", null, \"It shall be possible to use search queries of more than one word.\"), mdx(\"li\", null, \"Results shall be ranked using:\", mdx(\"br\", null), mdx(\"code\", null, \"score = word_frequency + 0.8 * document_location\")), mdx(\"li\", null, \"Display the top five search results with page and rank score.\")))), mdx(\"tr\", null, mdx(\"td\", null, \"A-B\"), mdx(\"td\", null, mdx(\"ul\", null, mdx(\"li\", null, \"Implement the PageRank algorithm and use it to rank the search results.\"), mdx(\"li\", null, \"Run the algorithm for 20 iterations.\"), mdx(\"li\", null, \"Results shall be ranked using:\", mdx(\"br\", null), mdx(\"code\", null, \"score = word_frequency + 0.8 * document_location + 0.5 * pagerank\")), mdx(\"li\", null, \"Display the top five search results with page and rank score.\"))))), mdx(Hint, {\n    mdxType: \"Hint\"\n  }, \"Note that the dataset has been updated, so the last part of the recording results is inaccurate. The slides PDF has been updated to the new dataset.\"), mdx(\"h2\", null, \"Test cases\"), mdx(\"p\", null, \"Here are some test cases you can use to verify that your search engine works correctly.\"), mdx(\"h3\", null, \"Grade E\"), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1035px\"\n    }\n  }, \"\\n      \", mdx(\"a\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/courses/web-intelligence-ht25/static/5263c5999000db1f0cc911b84cbeefbe/78958/A3-E.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }, \"\\n    \", mdx(\"span\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"30.501930501930502%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAABGklEQVQY042Q226CUBRE+f+voto0CBpttdyqRYrhFkGQA+IFVsMxbR+aNJ1kMtkvK7NHORwOJEnMfp/i7yLyY0shzmTlmeJ4YrPZkKYp/1Hf9yiLxZLR+AlV1VAfJozGBrqx4vllhTGdomkauq4zm82Yz+dYloVpmti2/W3XdXEchyAIULSJQB1VvJoCyxbYdoXj1JRlQ9PUNE1DXdecTifZdGicJAm+7xNFEZ7nEccx6/VatlRMq2O56nDfOoT4+6W2bcnzHCEEZVlSVRVZlsn8mkUxLXh86tEN2G4hjuEjGNxxufTDMnKbQQNoaFUUhQTc90/kHYbhHRiGKUEQ4fs73r0QTzqirjvunB9g13Vcr1eZt9vtVw7AT3vqwuXPGs+rAAAAAElFTkSuQmCC')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), \"\\n  \", mdx(\"img\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"resources/A3-E.png\",\n    \"title\": \"resources/A3-E.png\",\n    \"src\": \"/courses/web-intelligence-ht25/static/5263c5999000db1f0cc911b84cbeefbe/e3189/A3-E.png\",\n    \"srcSet\": [\"/courses/web-intelligence-ht25/static/5263c5999000db1f0cc911b84cbeefbe/a2ead/A3-E.png 259w\", \"/courses/web-intelligence-ht25/static/5263c5999000db1f0cc911b84cbeefbe/6b9fd/A3-E.png 518w\", \"/courses/web-intelligence-ht25/static/5263c5999000db1f0cc911b84cbeefbe/e3189/A3-E.png 1035w\", \"/courses/web-intelligence-ht25/static/5263c5999000db1f0cc911b84cbeefbe/78958/A3-E.png 1320w\"],\n    \"sizes\": \"(max-width: 1035px) 100vw, 1035px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\"\n  }), \"\\n  \"), \"\\n    \")), mdx(\"h3\", null, \"Grade C-D\"), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1035px\"\n    }\n  }, \"\\n      \", mdx(\"a\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/courses/web-intelligence-ht25/static/40bb6a399c5145cdb92a65f0c40f65bd/6569d/A3-CD.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }, \"\\n    \", mdx(\"span\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"30.501930501930502%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAABG0lEQVQY042Q226CQBRF+f+v8jLUW1GqBYx9oEQBG0CGm9YLrGbG2j70pSfZOXsymXX2HKOuaw6HDClzikKSpgnHY4Oq6hOEHbB4y/hvGcvlK/2BQIgRpjmi1xNY1oLVykGYM/oDk6E5xrIsbNvGcRyt9Xqt5Xkem81Ga7vdYjhOxXgiMZ8k06lkKCSTaYEwJa6XU9cVVVVSliVpmhIEAXEc4/s+URSx2+0Iw1Cfr9crhuu1zJ47HLfjZdnheh3zRYvv//3O5XLR0NPpRFEUqHU1TaOHZdl9LcZ80TEULe8BnM/3h12n1Cmn+91DVVU6YZ7nOp2Cq54kiU6qgVH0gZLvhzr6fh8TRSFt237Df4EPr+5ut9uPf0gBvwCuKsGP6GJZAQAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), \"\\n  \", mdx(\"img\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"resources/A3-CD.png\",\n    \"title\": \"resources/A3-CD.png\",\n    \"src\": \"/courses/web-intelligence-ht25/static/40bb6a399c5145cdb92a65f0c40f65bd/e3189/A3-CD.png\",\n    \"srcSet\": [\"/courses/web-intelligence-ht25/static/40bb6a399c5145cdb92a65f0c40f65bd/a2ead/A3-CD.png 259w\", \"/courses/web-intelligence-ht25/static/40bb6a399c5145cdb92a65f0c40f65bd/6b9fd/A3-CD.png 518w\", \"/courses/web-intelligence-ht25/static/40bb6a399c5145cdb92a65f0c40f65bd/e3189/A3-CD.png 1035w\", \"/courses/web-intelligence-ht25/static/40bb6a399c5145cdb92a65f0c40f65bd/6569d/A3-CD.png 1328w\"],\n    \"sizes\": \"(max-width: 1035px) 100vw, 1035px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\"\n  }), \"\\n  \"), \"\\n    \")), mdx(\"h3\", null, \"Grade A-B\"), mdx(\"p\", null, mdx(\"span\", {\n    parentName: \"p\",\n    \"className\": \"gatsby-resp-image-wrapper\",\n    \"style\": {\n      \"position\": \"relative\",\n      \"display\": \"block\",\n      \"marginLeft\": \"auto\",\n      \"marginRight\": \"auto\",\n      \"maxWidth\": \"1035px\"\n    }\n  }, \"\\n      \", mdx(\"a\", {\n    parentName: \"span\",\n    \"className\": \"gatsby-resp-image-link\",\n    \"href\": \"/courses/web-intelligence-ht25/static/a4d1826d52cc6d4a47c2674ee5f17717/78958/A3-AB.png\",\n    \"style\": {\n      \"display\": \"block\"\n    },\n    \"target\": \"_blank\",\n    \"rel\": \"noopener\"\n  }, \"\\n    \", mdx(\"span\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-background-image\",\n    \"style\": {\n      \"paddingBottom\": \"30.115830115830118%\",\n      \"position\": \"relative\",\n      \"bottom\": \"0\",\n      \"left\": \"0\",\n      \"backgroundImage\": \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAGCAYAAADDl76dAAAACXBIWXMAABYlAAAWJQFJUiTwAAABD0lEQVQY032R626CQBgFef+HalpDaRHtolXqrYgUXSCCUQlgBKbZTWya2PQkk/Nv9stZ43DIiWNJmiaa3W5LFIXs93uu1yvL5ZI4jrml67p/McbjKab5imnaPFs2vd4LliUQ7ojBYIBt2ziOw3A4RAiB53ma+XzObDbTLBYLTRiGGEKUPPXOmFbBw+MZu1/w6VcURU1VlVRVpanrmjzPWa1WpGmK7/v68vV6TZIkulWMybRlNG55n7QItyHLOi4X/oySSikpikJPcjqdyLJMt3pEC70PsPvw5oIz7HBHkGX3W6mUZamFSqCuOh6PWqz6trMhZUoQbAmCLzYbSRSpD5I/kt9C1W3bapqmuWsl/AYM0MIDdm+0qgAAAABJRU5ErkJggg==')\",\n      \"backgroundSize\": \"cover\",\n      \"display\": \"block\"\n    }\n  }), \"\\n  \", mdx(\"img\", {\n    parentName: \"a\",\n    \"className\": \"gatsby-resp-image-image\",\n    \"alt\": \"resources/A3-AB.png\",\n    \"title\": \"resources/A3-AB.png\",\n    \"src\": \"/courses/web-intelligence-ht25/static/a4d1826d52cc6d4a47c2674ee5f17717/e3189/A3-AB.png\",\n    \"srcSet\": [\"/courses/web-intelligence-ht25/static/a4d1826d52cc6d4a47c2674ee5f17717/a2ead/A3-AB.png 259w\", \"/courses/web-intelligence-ht25/static/a4d1826d52cc6d4a47c2674ee5f17717/6b9fd/A3-AB.png 518w\", \"/courses/web-intelligence-ht25/static/a4d1826d52cc6d4a47c2674ee5f17717/e3189/A3-AB.png 1035w\", \"/courses/web-intelligence-ht25/static/a4d1826d52cc6d4a47c2674ee5f17717/78958/A3-AB.png 1320w\"],\n    \"sizes\": \"(max-width: 1035px) 100vw, 1035px\",\n    \"style\": {\n      \"width\": \"100%\",\n      \"height\": \"100%\",\n      \"margin\": \"0\",\n      \"verticalAlign\": \"middle\",\n      \"position\": \"absolute\",\n      \"top\": \"0\",\n      \"left\": \"0\"\n    },\n    \"loading\": \"lazy\",\n    \"decoding\": \"async\"\n  }), \"\\n  \"), \"\\n    \")), mdx(Hint, {\n    mdxType: \"Hint\"\n  }, \"Note that updating PageRanks can be very slow if implemented with inefficient data structures. As a comparison, my Python implementation takes around four seconds to update PageRanks. It is okay if your PageRank scores differ slightly, \\xB10.02, compared to the test cases.\"));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#description","title":"Description"},{"url":"#submission-instructions","title":"Submission instructions"},{"url":"#requirements","title":"Requirements"},{"url":"#test-cases","title":"Test cases","items":[{"url":"#grade-e","title":"Grade E"},{"url":"#grade-c-d","title":"Grade C-D"},{"url":"#grade-a-b","title":"Grade A-B"}]}]},"parent":{"relativePath":"assignments/a3.md"},"frontmatter":{"metaTitle":"2DV515 | A3","metaDescription":"metaDescription"}},"allMdx":{"edges":[{"node":{"fields":{"slug":"/","title":"Web Intelligence (2DV515)"}}},{"node":{"fields":{"slug":"/_playground/_todo-examination","title":"TODO: Examination"}}},{"node":{"fields":{"slug":"/_playground","title":"Playground"}}},{"node":{"fields":{"slug":"/assignments/a1","title":"A1 - Recommendation System"}}},{"node":{"fields":{"slug":"/_playground/expectations","title":"Expectations"}}},{"node":{"fields":{"slug":"/assignments/a2","title":"A2 - Clustering"}}},{"node":{"fields":{"slug":"/assignments/a3","title":"A3 - Search Engine"}}},{"node":{"fields":{"slug":"/assignments/a4","title":"A4 - Machine Learning"}}},{"node":{"fields":{"slug":"/assignments","title":"Assignments"}}},{"node":{"fields":{"slug":"/assignments/datasets","title":"Datasets"}}},{"node":{"fields":{"slug":"/lectures","title":"Lectures"}}},{"node":{"fields":{"slug":"/lectures/lecture01","title":"L01 - Introduction"}}},{"node":{"fields":{"slug":"/lectures/lecture02","title":"L02 - Recommendation Systems"}}},{"node":{"fields":{"slug":"/lectures/lecture03","title":"L03 - Clustering"}}},{"node":{"fields":{"slug":"/lectures/lecture04","title":"L04 - Search Engines"}}},{"node":{"fields":{"slug":"/lectures/lecture05","title":"L05 - What is Machine Learning?"}}},{"node":{"fields":{"slug":"/lectures/lecture07","title":"L07 - Naïve Bayes"}}},{"node":{"fields":{"slug":"/projects","title":"Projects"}}},{"node":{"fields":{"slug":"/projects/p2","title":"P2 – Clustering"}}},{"node":{"fields":{"slug":"/projects/p1","title":"P1 – Recommendation System"}}},{"node":{"fields":{"slug":"/projects/p3","title":"P3 – Text Classification"}}},{"node":{"fields":{"slug":"/projects/p4","title":"P4 – Web scraping"}}},{"node":{"fields":{"slug":"/projects/project","title":"Project"}}},{"node":{"fields":{"slug":"/sandbox/code","title":"Code"}}},{"node":{"fields":{"slug":"/sandbox/basic-elements","title":"Basic elements"}}},{"node":{"fields":{"slug":"/sandbox/exercise","title":"Exercises"}}},{"node":{"fields":{"slug":"/sandbox/frontmatter","title":"Frontmatter"}}},{"node":{"fields":{"slug":"/sandbox/hint","title":"Hint"}}},{"node":{"fields":{"slug":"/sandbox","title":"Sandbox"}}},{"node":{"fields":{"slug":"/sandbox/markdown-import","title":"Imported markdown"}}},{"node":{"fields":{"slug":"/sandbox/mermaid","title":"Mermaid"}}},{"node":{"fields":{"slug":"/lectures/lecture06","title":"L06 - Data and Learning"}}},{"node":{"fields":{"slug":"/sandbox/tabs","title":"Tabs"}}},{"node":{"fields":{"slug":"/sandbox/youtube","title":"YouTube"}}},{"node":{"fields":{"slug":"/study-guide/communication","title":"Communication"}}},{"node":{"fields":{"slug":"/study-guide/deadlines-and-submissions","title":"Deadlines and Submissions"}}},{"node":{"fields":{"slug":"/study-guide/grading","title":"Grading"}}},{"node":{"fields":{"slug":"/study-guide/registration","title":"Registration"}}},{"node":{"fields":{"slug":"/study-guide/welcome","title":"🎉 Welcome"}}},{"node":{"fields":{"slug":"/projects/_DEPRECATED/project","title":"Project"}}},{"node":{"fields":{"slug":"/study-guide/guides/git-and-multiple-computers","title":"Git and multiple computers"}}},{"node":{"fields":{"slug":"/study-guide/guides/an-introduction-to-git","title":"An introduction to Git"}}},{"node":{"fields":{"slug":"/study-guide/guides/git-commit-best-practices","title":"Git commit best practices"}}},{"node":{"fields":{"slug":"/study-guide/guides","title":"Guides"}}},{"node":{"fields":{"slug":"/study-guide/guides/set-up-git","title":"Set up Git"}}},{"node":{"fields":{"slug":"/study-guide/guides/multiple-git-user-configs","title":"Multiple Git user configs"}}},{"node":{"fields":{"slug":"/study-guide/instructors","title":"Instructors"}}},{"node":{"fields":{"slug":"/study-guide/guides/submit-an-assignment-as-a-merge-request","title":"Submit an assignment as a merge request"}}},{"node":{"fields":{"slug":"/study-guide/guides/troubleshooting-ssh","title":"Troubleshooting SSH"}}},{"node":{"fields":{"slug":"/study-guide/guides/this-happens-with-git-commands","title":"This happens with Git commands"}}},{"node":{"fields":{"slug":"/study-guide/readings","title":"Readings"}}},{"node":{"fields":{"slug":"/study-guide","title":"Study Guide"}}}]}},"pageContext":{"id":"60b237bb-d61d-5911-97c2-acb15f444f38"}},
    "staticQueryHashes": ["253607798","3706406642","710574383"]}