12.06.2015 Views

The Annoyance Filter.pdf - Fourmilab

The Annoyance Filter.pdf - Fourmilab

The Annoyance Filter.pdf - Fourmilab

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

§243 ANNOYANCE-FILTER HEADER INCLUDE FILES 197<br />

#else<br />

munmap(dp, fileLength );<br />

close (fileHandle );<br />

is .close ( );<br />

#endif<br />

if (¬singleDictionaryRead ) {<br />

updateProbability ( );<br />

}<br />

singleDictionaryRead = false ;<br />

}<br />

break;<br />

case 219: /∗ −−sigwords n Classify message based on n most significant words ∗/<br />

significantWords = atoi (optarg );<br />

if (verbose ) {<br />

cerr ≪ "Significant␣words␣set␣to␣" ≪ significantWords ≪ "." ≪ endl ;<br />

}<br />

break;<br />

case 234: /∗ −−sloppyheaders Accept messages with malformed MIME part separators ∗/<br />

sloppyheaders = true ;<br />

break;<br />

case 210: /∗ −−statistics Print statistics of dictionary ∗/<br />

updateProbability ( );<br />

dict .printStatistics ( );<br />

break;<br />

case ’t’: /∗ −t, −−test fname Test message in fname ∗/<br />

{<br />

double score = classifyMessages (optarg );<br />

if (transcriptFilename ≠ "−") {<br />

cout ≪ "Junk␣probability␣" ≪ score ≪ endl ;<br />

}<br />

}<br />

break;<br />

case 208: /∗ −−threshjunk n Set junk threshold to n ∗/<br />

junkThreshold = atof (optarg );<br />

if (verbose ) {<br />

cerr ≪ "Junk␣threshold␣set␣to␣" ≪ setprecision (5) ≪ junkThreshold ≪ "." ≪ endl ;<br />

}<br />

break;<br />

case 214: /∗ −−threshmail n Set mail threshold to n ∗/<br />

mailThreshold = atof (optarg );<br />

if (verbose ) {<br />

cerr ≪ "Mail␣threshold␣set␣to␣" ≪ setprecision (5) ≪ mailThreshold ≪ "." ≪ endl ;<br />

}<br />

break;<br />

case 204: /∗ −−transcript fname Write annotated message transcript to fname ∗/<br />

transcriptFilename = optarg ;<br />

break;<br />

case ’v’: /∗ −v, −−verbose Print processing information ∗/<br />

verbose = true ;<br />

break;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!