-
Notifications
You must be signed in to change notification settings - Fork 5
/
coursework4.fsx
60 lines (40 loc) · 1.91 KB
/
coursework4.fsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
(*
ITT8060 -- Advanced Programming 2013
Department of Computer Science
Tallinn University of Technology
------------------------------------
Coursework 4: Data and behaviours
------------------------------------
Name:
Student ID:
------------------------------------
NB!!! Coursework submission guidelines changed. See below.
Answer the questions below. You answers to questions should be
correct F# code written after the question. This file is an F#
script file, it should be possible to load the whole file at
once. If you can't then you have introduced a syntax error
somewhere.
This coursework will be graded. When submitting the coursework,
call the file you submit "Lastname_Firstname.fsx" with your first
and last name appropriately, attach it to an e-mail with
subject line "[ITT8060] Coursework 4", and send it to
itt8060@cs.ttu.ee.
The coursework is due on October 18.
*)
// 1. Download a snapshot of the RSS feed (or load directly over HTTP):
// http://www.theregister.co.uk/headlines.atom
// Using the example from live6.fsx, write a data structure RSSPart in F#
// that you would use to represent RSS feeds.
// 2. Write a function that loads the (downloaded) XML file and parses it into
// the data structure designed in task 1.
// 3. Write an aggregate function that returns how many news items each author
// wrote on a particular day.
// 4. Define a list of 5 functions where each function tests if a word of interest
// is contained in the summary field.
// Use key words of your interest (i.e. at least 5 key words).
// 5. Write a function that filters out entries of interest based on the list defined
// in the previous problem.
// 6. ** Bonus **
// Define a decision tree based on the key words of interest. For example, if the
// word "space" is found in the summary, the entry is of interest if it also contains
// the word "software".