Package edu.ucla.sspace.common.SemanticSpaceIO

Examples of edu.ucla.sspace.common.SemanticSpaceIO.SSpaceFormat


        if (argOptions.hasOption("wordLimit"))
            props.setProperty(IteratorFactory.TOKEN_COUNT_LIMIT_PROPERTY,
                              argOptions.getStringOption("wordLimit"));

        // Get the format to be used when writing the semantic space.
        SSpaceFormat format = (argOptions.hasOption("outputFormat"))
            ? SSpaceFormat.valueOf(
                argOptions.getStringOption("outputFormat").toUpperCase())
            : getSpaceFormat();

        IteratorFactory.setProperties(props);
View Full Code Here


                outputFile = outputPath;
        }

        System.out.println("output File: " + outputFile);

        SSpaceFormat format = (argOptions.hasOption("outputFormat"))
            ? SSpaceFormat.valueOf(
                argOptions.getStringOption("outputFormat").toUpperCase())
            : getSpaceFormat();

        SemanticSpaceWriter writer =
View Full Code Here

     * @throws IOException if any I/O exception occurs when reading the semantic
     *         space data from the file
     */
    public StaticSemanticSpace(File file) throws IOException {
        spaceName = file.getName();
        SSpaceFormat format = SemanticSpaceIO.getFormat(file);
        if (format == null)
            throw new Error("Unrecognzied format in " +
                            "file: " + file.getName());
        DataInputStream dis = new DataInputStream(
            new BufferedInputStream(new FileInputStream(file)));
View Full Code Here

     * @throws Error if the 4-byte header for the file contains an unrecognized
     *         semantic space format
     */
    public OnDiskSemanticSpace(File file) throws IOException {
        containsHeader = true;
        SSpaceFormat format = SemanticSpaceIO.getFormat(file);
        if (format == null)
            throw new Error("Unrecognzied format in " +
                            "file: " + file.getName());
        loadOffsetsFromFormat(file, format);
    }
View Full Code Here

TOP

Related Classes of edu.ucla.sspace.common.SemanticSpaceIO.SSpaceFormat

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.