Git Product home page Git Product logo

ac3.2-frankentable's Introduction

AC3.2-Frankentable

Object

Build a TableView based app that parses a block of text and displays a concordance of Mary Wollstonecraft (Godwin) Shelley's Frankenstein in a table. Each row of the table should display a unique word in it and its frequency count next to it.

Steps

  1. The usual forking and cloning. This time there is a project inside named Frankentable. Open it.

  2. The project has a Table View controller and a Data.txt file with a small excerpt from the book. This file is opened and spat out in viewDidLoad to get you going.

  3. Split the block of text into unique words and count their frequency. Probably going to want to use a Dictionary.

  4. Display one row per word, showing the word and its frequency, Example cell:

    ***********************************
    *                                 *
    *   Albatross (12)                *
    *                                 *
    ***********************************
    
  5. Sort alphabetically, with a section for each letter of the alphabet, grouping by the initial letter of each word.

  6. Sort by frequency, ordered reverse. I.e. the most frequent word should be in the first cell, the least in the last. Section by distinct freqency counts. For example, say the highest frequency was 43 and there was 1 word with that frequency, then a section named "43" would have that one row. If the next most frequent word occurred 22 times, and there were three such words, they would be in the "22" section. And so on.

  7. Optional: If you feel ambitious you could grab the full data via an web request to http://www.gutenberg.org/cache/epub/84/pg84.txt. It would be wrong to call this an API call because it's just a text file. Don't try to turn it into JSON. Just read it like we're doing with the local file. It should still be done asynchronously.

ac3.2-frankentable's People

Contributors

jgresh avatar

Watchers

James Cloos avatar  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.