Package com.meapsoft

Examples of com.meapsoft.ParserException


    if (!trainFile.haveReadFile)
      trainFile.readFile();

    if (trainFile.chunks.size() == 0)
      throw new ParserException(trainFile.filename, "No chunks found");

    trainFile = (FeatFile) trainFile.clone();
    trainFile.normalizeFeatures();
    trainFile.applyFeatureWeights();

    // To change the number of beats per state all we have to do
    // is modify the chunks in trainFile by joining every
    // beatsPerCodeword chunk into one a superchunk.
    Vector newChunks = new Vector();
    for (int x = 0; x < trainFile.chunks.size() - beatsPerCodeword + 1; x += beatsPerCodeword)
    {
      FeatChunk newChunk = (FeatChunk) ((FeatChunk) trainFile.chunks
          .get(x)).clone();

      // double length = 0;
      for (int y = 1; y < beatsPerCodeword; y++)
      {
        FeatChunk f = (FeatChunk) trainFile.chunks.get(x + y);

        newChunk.addFeature(f.getFeatures());
        newChunk.length += f.length;
      }

      newChunks.add(newChunk);
    }

    trainFile.chunks = newChunks;

    progress.setMaximum(trainFile.chunks.size());

    if (featsToQuantize != null)
    {
      if (!featsToQuantize.haveReadFile)
        featsToQuantize.readFile();

      // What if features don't match
      if (!featsToQuantize.isCompatibleWith(trainFile))
        throw new ParserException(trainFile.filename,
            "Features do not match those in "
                + featsToQuantize.filename);

      featsToQuantize = (FeatFile) featsToQuantize.clone();
      featsToQuantize.normalizeFeatures();
View Full Code Here


    if (!featFile.haveReadFile)
      featFile.readFile();

    if (featFile.chunks.size() == 0)
      throw new ParserException(featFile.filename, "No chunks found");

    progress.setMaximum(featFile.chunks.size());
  }
View Full Code Here

    if (!featFile.haveReadFile)
      featFile.readFile();

    if (featFile.chunks.size() == 0)
      throw new ParserException(featFile.filename, "No chunks found");

        if (normalizeFeatures)
    {
      featFile = (FeatFile) featFile.clone();
            featFile.normalizeFeatures();
View Full Code Here

    if (!featFile.haveReadFile)
      featFile.readFile();

    if (featFile.chunks.size() == 0)
      throw new ParserException(featFile.filename, "No chunks found");

    progress.setMaximum(featFile.chunks.size());

    // System.out.println("blip chunks in: " + featFile.chunks.size());
  }
View Full Code Here

    if (!inEDLFile.haveReadFile)
      inEDLFile.readFile();

    if (inEDLFile.chunks.size() == 0)
      throw new ParserException(inEDLFile.filename, "No chunks found");

    if (normalizeFeatures)
    {
      // inEDLFile = (EDLFile) inEDLFile.clone();
      inEDLFile.normalizeFeatures();
View Full Code Here

    if(!featFile.haveReadFile)
      featFile.readFile();

    if(featFile.chunks.size() == 0)
      throw new ParserException(featFile.filename, "No chunks found");

        progress.setMaximum(featFile.chunks.size());
  }
View Full Code Here

            dstFile.readFile();
        if(!DBFile.haveReadFile)
            DBFile.readFile();
       
        if(dstFile.chunks.size() == 0
            throw new ParserException(dstFile.filename, "No chunks found");
        if(DBFile.chunks.size() == 0)
            throw new ParserException(DBFile.filename, "No chunks found");

        // What if features don't match
        if(!dstFile.isCompatibleWith(DBFile))
            throw new ParserException(DBFile.filename,
                          "Features do not match those in " + dstFile.filename);

        dstFile = (FeatFile)dstFile.clone();
        dstFile.normalizeFeatures();
        dstFile.applyFeatureWeights();
View Full Code Here

        if(!featFile.haveReadFile)
            featFile.readFile();

        if(featFile.chunks.size() == 0)
            throw new ParserException(featFile.filename, "No chunks found");
       
        progress.setMaximum(featFile.chunks.size());
    }
View Full Code Here

        if(!featFile.haveReadFile)
            featFile.readFile();

        if(featFile.chunks.size() == 0)
            throw new ParserException(featFile.filename, "No chunks found");

        if(normalizeFeatures)
        {
            featFile = (FeatFile)featFile.clone();
            featFile.normalizeFeatures();
View Full Code Here

        if(!inEDLFile.haveReadFile)
            inEDLFile.readFile();

        if(inEDLFile.chunks.size() == 0)
            throw new ParserException(inEDLFile.filename, "No chunks found");

        if(normalizeFeatures)
        {
//            inEDLFile = (EDLFile) inEDLFile.clone();
            inEDLFile.normalizeFeatures();
View Full Code Here

TOP

Related Classes of com.meapsoft.ParserException

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.