Giter VIP home page Giter VIP logo

diffusion-rust-task's Introduction

A Rust-Based Text Processing System

This task involves building a proof-of-concept Rust application capable of loading, analyzing and manipulating batch text data. The intention of the task is to assess your understand of Rust's memory safety features, data handling capabilities and software design principles.

As part of this task, you are provided with over 10,000 works of literature, provided in .txt format within an AWS S3 bucket. These files are provided in separate .txt files, but in order to complete the task, you will be required to demonstrate a system which can handle and parse them from within a single large .txt file which will not fit entirely in system memory.

This assignment is split into four separate subtasks, and you will be assessed on how well you solve each of the requirements in each task.

Task 1: Data Loading and Manipulation

Objective

Load a text file, process its content to count the frequency of each word, and store the results in a suitable data structure.

Focus

Collections, Borrowing, Lifetimes, and Pointers.

Requirements

Efficiently handle large text files without running out of memory.

Use borrowing and lifetimes to manipulate data within collections without unnecessary cloning.

Data

  • Can be queried from S3 directly through the following links as

    https://diffusion-corpus.s3.eu-west-2.amazonaws.com/1.txt

    https://diffusion-corpus.s3.eu-west-2.amazonaws.com/2.txt

    ...

You should load this data, merge it into a single .txt file and work from the single file. There are over 10,000 files in this bucket for processing.

Task 2: Text Analysis Engine

Objective:

Implement an analysis engine that can perform various analyses on the text, such as finding the n most common words, identifying unique words, and calculating sentence complexity.

Focus:

Functional Language Features, Traits, and Pattern Matching:

  • Leverage Rust's functional programming aspects, such as iterators and closures.
  • Use traits to define common behavior for text analysis.
  • Employ pattern matching to simplify logic for different analysis criteria.

Requirements:

Task 3: Concurrency in Text Processing

Objective:

Modify the analysis engine to process multiple text files concurrently, demonstrating efficient use of Rust's concurrency features.

Focus:

Concurrency and Multithreading.

Requirements:

  • Implement multithreading to allow processing of multiple files at the same time.
  • Ensure thread safety and data consistency without compromising performance.

For the concurrency task, you may work with different files in the S3 bucket concurrently.

Task 4: Finalizing

Objective:

Design the application with extensibility in mind, allowing for new types of analyses to be easily added.

Focus:

Tooling.

Requirements:

  • Implement a CLI (Command Line Interface) to interact with the system.
  • Include unit and integration tests to cover critical functionalities and concurrency logic.

Task 5: Extension

Objective:

To add an additional feature to the application: write a program which, given a specific word, will return a list of files that this word appears in, alongside its location in those files.

Focus:

Specialized Data Structures.

Requirements:

  • Implement a method or CLI to query the program for a specific word.

diffusion-rust-task's People

Contributors

jakexbt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.