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.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
courses:be5b33prg:homeworks:spam:step4 [2015/10/15 14:01]
xposik created
courses:be5b33prg:homeworks:spam:step4 [2015/10/15 15:16]
xposik [Preparation]
Line 14: Line 14:
 You should think about and write down on a piece of paper: You should think about and write down on a piece of paper:
   * How is a spam filter actually used?   * How is a spam filter actually used?
-  * What is the difference (from the implementation standpoint) between learning filter and non-learning filter?+  * What is the difference (from the implementation standpoint) between ​learning filter and non-learning filter?
   * Is there any part which all of the spam filters have in common?   * Is there any part which all of the spam filters have in common?
   * Is it better to create a spam filter as a function or as a class with methods and properties?   * Is it better to create a spam filter as a function or as a class with methods and properties?
-  * What are the minimal requirements for such a realization? What does it have to be able to do, and what inputs and what outputs does it have to have?+  * What are the minimal requirements for such an implementation? What does it have to be able to do, and what inputs and what outputs does it have to have?
  
-Read how the //​inheritance//​ in OOP works and how it is used in Python. You can find more information here:+ 
 +**Optional (for more advanced programmers):​** ​Read how the //​inheritance//​ in OOP works and how it is used in Python. You can find more information here:
  
   * in the official [[http://​docs.python.org/​release/​3.2.3/​tutorial/​classes.html#​inheritance|Python tutorial]], or   * in the official [[http://​docs.python.org/​release/​3.2.3/​tutorial/​classes.html#​inheritance|Python tutorial]], or
   * in {[a4b99rph:​Downey2009]},​ [[http://​www.greenteapress.com/​thinkpython/​html/​book019.html|chapter 18]], [[http://​www.greenteapress.com/​thinkpython/​html/​book019.html#​toc199|section 18.7]], or   * in {[a4b99rph:​Downey2009]},​ [[http://​www.greenteapress.com/​thinkpython/​html/​book019.html|chapter 18]], [[http://​www.greenteapress.com/​thinkpython/​html/​book019.html#​toc199|section 18.7]], or
   * in {[a4b99rph:​Wentworth2012]},​ [[http://​openbookproject.net/​thinkcs/​python/​english3e/​inheritance.html|chapter 23]].   * in {[a4b99rph:​Wentworth2012]},​ [[http://​openbookproject.net/​thinkcs/​python/​english3e/​inheritance.html|chapter 23]].
 +
  
 /* /*
Line 37: Line 39:
     * ''​ParanoidFilter''​ which classifies all the emails as ''​SPAM'',​ and     * ''​ParanoidFilter''​ which classifies all the emails as ''​SPAM'',​ and
     * ''​RandomFilter''​ which assigns the lables ''​OK''​ and ''​SPAM''​ randomly.     * ''​RandomFilter''​ which assigns the lables ''​OK''​ and ''​SPAM''​ randomly.
-    * If these 3 filters have some functionality in common, try to extract it into a common ancestor called ''​BaseFilter''​ **in module ''​basefilter.py''​**.+    ​* **Optional:​** If these 3 filters have some functionality in common, try to extract it into a common ancestor called ''​BaseFilter''​ **in module ''​basefilter.py''​**.
  
 Why do we need it? Why do we need it?
courses/be5b33prg/homeworks/spam/step4.txt · Last modified: 2015/11/25 15:56 by xposik