CourseWare Wiki
Switch Term
Winter 2024 / 2025
Winter 2023 / 2024
Winter 2022 / 2023
Winter 2021 / 2022
Winter 2020 / 2021
Winter 2019 / 2020
Winter 2018 / 2019
Older
Search
Log In
old
courses
be5b33prg
homeworks
spam
step1
Warning
This page is located in archive. Go to the latest version of this
course pages
.
Differences
This shows you the differences between two versions of the page.
View differences:
Side by Side
Inline
Go
Link to this comparison view
Both sides previous revision
Previous revision
2015/11/30 15:29 xposik [Specifications]
2015/11/26 09:13 xposik [Specifications]
2015/11/26 09:13 xposik [Specifications]
2015/11/26 09:12 xposik
2015/10/15 14:48 xposik [Preparation]
2015/10/15 14:48 xposik [Preparation]
2015/10/15 14:47 xposik [Preparation]
2015/10/15 14:45 xposik [Preparation]
2015/10/15 14:44 xposik [Preparation]
2015/10/15 14:09 xposik
2015/10/15 14:07 xposik
2015/10/15 14:07 xposik
2015/10/15 13:55 xposik [Spam filter - step 1]
2015/10/15 13:55 xposik created
Go
Next revision
Previous revision
2015/11/30 15:29 xposik [Specifications]
2015/11/26 09:13 xposik [Specifications]
2015/11/26 09:13 xposik [Specifications]
2015/11/26 09:12 xposik
2015/10/15 14:48 xposik [Preparation]
2015/10/15 14:48 xposik [Preparation]
2015/10/15 14:47 xposik [Preparation]
2015/10/15 14:45 xposik [Preparation]
2015/10/15 14:44 xposik [Preparation]
2015/10/15 14:09 xposik
2015/10/15 14:07 xposik
2015/10/15 14:07 xposik
2015/10/15 13:55 xposik [Spam filter - step 1]
2015/10/15 13:55 xposik created
Go
Last revision
Both sides next revision
courses:be5b33prg:homeworks:spam:step1 [2015/11/26 09:12]
xposik
courses:be5b33prg:homeworks:spam:step1 [2015/11/26 09:13]
xposik
[Specifications]
Line 50:
Line 50:
Function ''read_classification_from_file()'' (in module ''utils.py'') has to conform to the following specifications:
Function ''read_classification_from_file()'' (in module ''utils.py'') has to conform to the following specifications:
+
^ ''read_classification_from_file(fpath)'' ^^
^ Input | The path to the text file (most likely either ''!truth.txt'' or ''!prediction.txt'') |
^ Input | The path to the text file (most likely either ''!truth.txt'' or ''!prediction.txt'') |
^ Output | A dictionary containing either ''SPAM'' or ''OK'' label for each filename in email corpus. |
^ Output | A dictionary containing either ''SPAM'' or ''OK'' label for each filename in email corpus. |
Line 59:
Line 60:
email03 SPAM
email03 SPAM
email1234 OK
email1234 OK
-
...
</code>
</code>
and creates a dictionary (the order of individual "rows" in the following listing is not important):
and creates a dictionary (the order of individual "rows" in the following listing is not important):
courses/be5b33prg/homeworks/spam/step1.txt
· Last modified: 2015/11/30 15:29 by
xposik