home *** CD-ROM | disk | FTP | other *** search
/ Aminet 10 / aminetcdnumber101996.iso / Aminet / util / misc / ftype.lha / ftype.doc < prev   
Text File  |  1995-12-30  |  5KB  |  128 lines

  1. This program can be distributed with the following conditions:
  2.     1) This documentation is included and unaltered.
  3.     2) One may not charge more for it than the price of the
  4.     media being used in its distribution.  This means that
  5.     one can "sell" a disk containing this program for no more
  6.     than the price of a blank disk.
  7.     3) Special case - inclusion in Aminet CD collections is
  8.     allowed.
  9.  
  10. /*============================================================================*/
  11. Name:
  12.     ftype
  13.  
  14. Version:
  15.     0.9
  16.  
  17. Function:
  18.     This program determines a file's type based on past observances of
  19.     similar files.
  20.  
  21. Reason:
  22.     Before ftype, it was necessary to update file recognizers as new file
  23.     types came into usage.  One had to go find a "brain file" or specify
  24.     information from detailed personal knowledge of the new file type.
  25.     Recognizers in the past often (almost always) relied on a magic tag
  26.     at near the start of a file to identify a file.
  27.  
  28.     Ftype learns how to recognize a new file without requiring you to
  29.     research the file format or go hunting for a brain file.  It takes
  30.     advantage of magic numbers but it doesn't rely on them.  This means
  31.     that you can use ftype to diferentiate between C source files and C++
  32.     source files if you want to.  Of course, if two files are extremely
  33.     similar, ftype will have difficulty differentiating between them.
  34.  
  35. Disclaimer:
  36.     This is betaware and I don't have any Amigas other than my trusty A3000
  37.     to test test the system with so if it makes your machine explode, tell me
  38.     and I'll fix the program.
  39.  
  40. My results:
  41.     I train the system with two instances of each of the following file
  42.     types:
  43.         ILBM
  44.         C source
  45.         JPEG
  46.         LHA
  47.         song lyrics
  48.         SAS/C object files
  49.         PostScript
  50.  
  51.     When tested on five instances of each type, the system has a 100%
  52.     recognition rate.
  53.  
  54. Usage:
  55.     ftype <options> <filename> <datafile>
  56.     -h: help
  57.     -i: implicit training
  58.     -t <name>: train
  59.     -p: print network
  60.     -v: verbose
  61.     -d <name>: specify the data file to use
  62.  
  63.     Implicit training will cause the network to refine itself whenever a
  64.     file is strongly recognized.
  65.  
  66.     It is necessary to train the system before any files will be
  67.     recognized.  If you want to be able to detect JPEG and C source
  68.     files, find a few of them and do this:
  69.         ftype -t c <c source file A>
  70.         ftype -t c <c source file B>
  71.         ftype -t jpeg <JPEG file A>
  72.         ftype -t jpeg <JPEG file A>
  73.  
  74.     Train the system with at least three or four files for good results.
  75.  
  76.     The -p and -v options are used for debugging.  They make the system
  77.     print out a bunch of stuff about its internal state.
  78.  
  79.     Normally the system uses the file libs:ftype.dat to store its past
  80.     training.  If you want to start training from scratch, just delete this
  81.     file.  You can manually specify the data file to use with the -d
  82.     option.
  83.  
  84.     To ask the program what category a file fits into (a LHA file called
  85.     sobja.lha, for instance) type this:
  86.         ftype sobja.lha
  87.  
  88.     The program will print out something like this:
  89.         Strongly recognized the file "test/lha/sobja.lha" as the type "lha".
  90.         Distance: 0.010774
  91.  
  92.     The "Strongly" part means that the neural network was able to help in
  93.     file recognition.  Any file that is "Weakly" recognized is different
  94.     enough from the average file of its type that the neural network was
  95.     unable to aid in recognition.  If toy start seeing files be weakly
  96.     recognized, you might want to further train the program.
  97.  
  98.     The "Distance" is the error in the identification compared to the
  99.     average error for all neurons.  A large distance (what large is depends
  100.     on the file types you're working with) means that the identification is
  101.     uncertain.
  102.  
  103. Behavior:
  104.     The system uses a non-linear neural network to learn about the
  105.     significance of a file type's different features.  You may notice that
  106.     the system is slow when dealing with large files.  This is not a result
  107.     of accessing the network, it is due to the somewhat paranoid (overly
  108.     conservative) way my system does feature extraction.
  109.  
  110. Future Work:
  111.     If anyone makes (polite) suggestions regarding improvements to the
  112.     system, I will try to implement them.  I may work on speeding up the
  113.     feature extraction part of the program.  Right now, it's fast enough for
  114.     my A3000 with a fast hard drive but I don't think it would be much fun
  115.     on an A500.
  116.  
  117. Tested on:
  118.     Amiga 3000-25
  119.     4 megs fast, 2 megs chip
  120.     Seagate ST32550N drive
  121.     OS 3.1
  122.  
  123. Write Me:
  124.     If you have suggestions regarding improvements you would like to see or
  125.     bug reports, write me.
  126.  
  127.         -Robert Dick (dickrp@wckn.dorm.clarkson.edu)-
  128.