Package edu.ucla.sspace.basis

Examples of edu.ucla.sspace.basis.StringBasisMapping


    protected void handleExtraOptions() {
        // If the -L option is given, load the basis mapping from disk.
        if (argOptions.hasOption('L'))
            basis = loadObject(openLoadFile());
        else
            basis = new StringBasisMapping();
    }
View Full Code Here


     * @throws IOException if this instance encounters any errors when creatng
     *         the backing array files required for processing
     */
    public LocalityPreservingSemanticAnalysis(AffinityMatrixCreator creator)
            throws IOException {
        super(false, new StringBasisMapping(),
              new SvdlibcSparseBinaryMatrixBuilder(true));
        this.affinityCreator = creator;
    }
View Full Code Here

        if (argOptions.hasOption('L')) {
            basis = loadObject(openLoadFile());
            basis.setReadOnly(true);
        }
        else
            basis = new StringBasisMapping();
    }
View Full Code Here

        // If the -L option is given, load the basis mapping from disk.
        if (argOptions.hasOption('L')) {
            basis = loadObject(openLoadFile());
            basis.setReadOnly(true);
        } else
            basis = new StringBasisMapping();
    }
View Full Code Here

     *
     * @throws IOException if this instance encounters any errors when creatng
     *         the backing array files required for processing
     */
    public VectorSpaceModel() throws IOException {
        super(false, new StringBasisMapping(),
              new SvdlibcSparseBinaryMatrixBuilder());
    }
View Full Code Here

     *
     * @throws IOException if this instance encounters any errors when creatng
     *         the backing array files required for processing
     */
    public GenericTermDocumentVectorSpace() throws IOException {
        this(false,new StringBasisMapping(),Matrices.getMatrixBuilderForSVD());
    }
View Full Code Here

     * Saves the {@link BasisMapping} created from the {@link
     * OccurrenceCounter}.
     */
    protected void saveSSpace(SemanticSpace sspace, File outputFile)
            throws IOException{
        BasisMapping<String, String> savedTerms = new StringBasisMapping();
        for (String term : sspace.getWords())
            savedTerms.getDimension(term);

        ObjectOutputStream ouStream = new ObjectOutputStream(
                new FileOutputStream(outputFile));
        ouStream.writeObject(savedTerms);
        ouStream.close();
View Full Code Here

                                 int bound,
                                 DependencyPathAcceptor acceptor,
                                 DependencyPathWeight weighter,
                                 int pathLength) {
            cooccurrenceMatrix = new AtomicGrowingSparseHashMatrix();
            basis = new StringBasisMapping();
            wordScores = new BoundedSortedMap<String, Double>(bound);
            extractor = DependencyExtractorManager.getDefaultExtractor();

            this.transform = transform;
            this.acceptor = acceptor;
View Full Code Here

     * Saves the {@link BasisMapping} created from the {@link
     * OccurrenceCounter}.
     */
    protected void saveSSpace(SemanticSpace sspace, File outputFile)
            throws IOException{
        BasisMapping<String, String> savedTerms = new StringBasisMapping();
        for (String term : sspace.getWords())
            savedTerms.getDimension(term);

        ObjectOutputStream ouStream = new ObjectOutputStream(
                new FileOutputStream(outputFile));
        ouStream.writeObject(savedTerms);
        ouStream.close();
View Full Code Here

         */
        public OccurrenceCounter(Transform transform,
                                 int bound,
                                 int windowSize) {
            cooccurrenceMatrix = new AtomicGrowingSparseHashMatrix();
            basis = new StringBasisMapping();
            wordScores = new BoundedSortedMap<String, Double>(bound);
            weighting = new LinearWeighting();

            this.transform = transform;
            this.windowSize = windowSize;
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.basis.StringBasisMapping

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.