|
PackageStructure
Introduction to the code base, the basic functionality, and how it is packaged
IntroductionThe S-Space package attempts to provide a clean and reusable interface for using and building various semantic memory models. To facilitate this, we have developed a number of useful interfaces and classes which do the most common work for you. This document will outline which interfaces and classes are already provided and some guidance as to how to use them, along with the overall structure of the package. OrganizationIn agreement with most Java packages, all source files can be found in the src directory, in the edu/ucla/sspace sub folders. Corresponding test cases are also provided for many classes, and are located under the test directory, with the same underlying sub folders. Each Semantic Space model is given it's own directory under sspace, so that they can each be relatively self contained and be free to use other public package classes freely. New models should follow this pattern by choosing a short abbreviation of the s-space. Since many Semantic Space models should have a reasonable number of things in common, these things have been collected together and stored in the common package. These will by far the most re-used classes in the package for those implementing their own semantic space model. More on CommonCommon provides a mixture of several interfaces which make designing models easier, along with some already implemented sub-classes which fit particular use cases. The Utilites provided can broadly be split up into the following categories
SemanticSpace classesThe SemanticSpace interface defines the basic functionality which all Semantic Space models should implement for uniformity of use. Various utilities are then provided for any implemented SemanticSpace, such as storing the sspace as a binary or text file, and retrieving the sspace from a binary or text file for evaluation purposes. Matrix ClassesThe Matrix interface defines a consistent set of access and retrieval methods for all Matrix implementations, thereby allowing applications to easily switch between different Matrix implementations as needed. Three implementations are currently provided.
The S-Space package also provides support for I/O operations on Matrix instances through the MatrixIO class. This allows easy conversion between multiple on-disk matrix storage formats. The SVD (Singular Value Decomposition) class works in conjunction with the Matrix interface by translating a matrix into a suitable file format for a variety of svd implementations, the Singular Value Decomposition page has more details on this particular interface. Similarity FunctionsAdditionally, several similarity measures are provided:
Document Parsing UtilitiesThe Document interface, and it's iterators and implemented classes provides a uniform method of interacting with corpora so that methods calling processDocument have a uniform means of iterating through many document files. The provided Document related classes are:
Data StructuresThe S-Space package provides several data structures.
Additional utilities, data structures, and interface implementations are likely to be added, or split off into a related package if they grow to be significant enough to warrant a branching. |
Sign in to add a comment