moztorch
Class Heirarchy
mtMachine - Implements all mtIMachine methods.
mtMachineKnn - Glue to K-nearest neighbor machine in Torch library
mtMachineNBayes - Glue to naive bayesian machine in Torch library
mtMachineSvm - Glue to support vector machine in Torch library
mtMState - variables used to represent current machine state
mtMStateKnn
mtMStateNBayes
mtMStateSvm
mtModule - implements XPCOM housekeeping code (e.g., register components and implement factory code for creating them)
mtMStateNBayes::Init - Initialization object passed to mtMStateNBayes constructor
mtMStateSvm::Init - Initialization object passed to mtMStateSvm constructor
mtString - very small utility class for dealing with character arrays
Torch::MsgObserver - defines interface for registering a message observer (consumes text messages such as logs, errors, etc)
Coding Notes
- No need to check out param pointers in callee function (many sources suggest these will always be valid)
- All getter methods which return strings should use nsACString
Multithreading Notes
- Running the training or testing phases on a seperate thread is definitely on the stack of up-coming features.
At the moment, however, it is still being implemented.
- The Torch library is not threadsafe! In particular, the log handler is currently a global variable.
- Must create seperate Runnable for each phase (i.e., train and test) of mtIMachine
Build Instructions
To build the XPI file and everything it depends on:
- set
GECKO_SDK to path of gecko sdk
- run
make
To install a debugging version into the global Firefox directory:
- set
FIREFOX to path of firefox directory
- run
make debug
To test the installed debugging version:
- browse to
chrome://moztorch/content
Links
Bugs
- fix makefile: doesn't catch some dependencies (e.g. source target should depend on idl target)
- export working MSVC++ makefile: enables main makefile to rebuild libmoztorch
- make logging in libtorch threadsafe in preparation for implementing nsIRunnable interface