{"id":20636387,"url":"https://github.com/amraneze/autocomplete","last_synced_at":"2026-04-20T11:35:44.916Z","repository":{"id":176601314,"uuid":"256949531","full_name":"Amraneze/AutoComplete","owner":"Amraneze","description":"A project to display my knowledge in Scala","archived":false,"fork":false,"pushed_at":"2020-04-19T21:35:06.000Z","size":3918,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T08:38:02.760Z","etag":null,"topics":["circleci","docker","dockerfile","sbt","scala","scalafmt","scalatest"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Amraneze.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-19T08:25:14.000Z","updated_at":"2020-04-23T18:47:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"b8fbe004-ea4b-4cc8-b7a5-9a6c125e1634","html_url":"https://github.com/Amraneze/AutoComplete","commit_stats":null,"previous_names":["amraneze/autocomplete"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Amraneze/AutoComplete","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amraneze%2FAutoComplete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amraneze%2FAutoComplete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amraneze%2FAutoComplete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amraneze%2FAutoComplete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amraneze","download_url":"https://codeload.github.com/Amraneze/AutoComplete/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amraneze%2FAutoComplete/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32045703,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circleci","docker","dockerfile","sbt","scala","scalafmt","scalatest"],"created_at":"2024-11-16T15:10:39.486Z","updated_at":"2026-04-20T11:35:44.899Z","avatar_url":"https://github.com/Amraneze.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ContentSquare Auto-complete Challenge\n\n[![codecov](https://codecov.io/gh/Amraneze/AutoComplete/branch/master/graph/badge.svg)](https://codecov.io/gh/Amraneze/AutoComplete)\n[![CircleCI](https://circleci.com/gh/Amraneze/AutoComplete.svg?style=svg)](https://circleci.com/gh/Amraneze/AutoComplete)\n\nA challenge to display my knowledge in Scala. \nThe purpose of the challenge is to suggest four words based on a keyword.\n\n\u003eNote: Check the [Test_DE.pdf](docs/Test_DE.pdf) for more detailed information.\n\n## Additional Questions\n* What would you change if the list of keywords was much larger (several millions) ?\nUse Spark that can create more partitions which can benefit from caching (in memory) that will make the app run faster. And also, it can optimization of each transformation and run it in parallel. \n\n* What would you change if the requirements were to match any portion of the keywords (for example, given the string “pro”, the program could suggest the keyword “reprobe”) ?\nWe can replace `startsWith` with `indexOf` or `contains` (which is using just `indexOf`)\n \n## Getting Started\n\n### Prerequisites\n\n#### Sbt\n\n* Memory: At least 128MB\n* Operating System: Any operating system.\n* Disk Space: At least 124MB (for JRE) of available disk space.\n\n#### Docker\n\n* Memory: At least 2GB\n* Operating System: Linux kernel version 3.10 or higher, Windows x Pro/Ent x64.\n* Disk Space: 3GB of available disk space (For docker images and builds).\n\n\u003e NOTE: You may find all the details in the following page [Docker System requirements](https://docs.docker.com/datacenter/ucp/1.1/installation/system-requirements/)\n\n### Installing\n\n#### Sbt\n**You can follow this link [Install Sbt](https://www.scala-sbt.org/release/docs/Setup.html) to install Sbt**\n\n#### Docker\n**You can follow this link [Install Docker](https://docs.docker.com/install/) to install Docker**\n\u003eNote: This workshop is tested with Docker Community Edition `17.12.0-ce-win47 (15139), build 9c692cd` on `Win 10 Pro Version 1909 Build 18363.720`.\n\n## Running the project\n\n### With SBT\nFrom the root directory of the project, you can:\n\n#### Compile the project:\n```\nsbt compile\n```\n\n#### Run the Main App:\n```\nsbt run --string \"project runway,pinterest,river,kayak,progenex,progeria,pg\u0026e,project,free,tv,bank,proactive,progesterone,press,democrat,priceline,pandora,reprobe,paypal\" --delimiter \",\" --keyword \"pro\"\n```\n\u003eNote: If you use sbt run without argument you will have an exception thrown with an example of the command that needs to be run with the App.\n\nFor example you can try:\n```\nsbt run --string \"project runway,pinterest,river,kayak,progenex,progeria,pg\u0026e,project,free,tv,bank,proactive,progesterone,press,democrat,priceline,pandora,reprobe,paypal\" --delimiter \",\" --keyword \"pro\"\n```\nAnd you will get this result displayed in your terminal\n```\nproactive\nprogenex\nprogeria\nprogesterone\n```\n\n#### Package the project:\n```\nsbt package\n```\n\u003eNOTE: sbt package is packaging the project in a JAR file which is a normal Java JAR file.\n#### Run the test cases\n```\nsbt test\n```\n\n### With Docker\nAfter installing Docker and you want to run the project you can just run the following command:\n\n\u003eNote: You should be in root of the folder to execute these commands\n\u003e\nYou should build the image\n```\ndocker build -t auto-complete:v0.1 .\n```\n\nThen you can run a container with the image built using:\n\n#### providing a file\n```\ndocker run -e \"FILE_PATH=docs/Words.txt\" -e \"KEYWORD=prog\" auto-complete:v0.1\n```\n#### providing a string\n```\ndocker run -e \"STRING=project runway,pinterest,river,kayak,progenex,progeria,pg\u0026e,project free tv,bank,proactive,progesterone,press democrat,priceline,pandora,reprobe,paypal\" -e \"DELIMITER=,\" -e \"KEYWORD=prog\" auto-complete:v0.1\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famraneze%2Fautocomplete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famraneze%2Fautocomplete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famraneze%2Fautocomplete/lists"}