Package com.fujitsu.ca.fic.exceptions

Examples of com.fujitsu.ca.fic.exceptions.IncorrectLineFormatException


            int featureIndex = Integer.parseInt(fields[0]);

            if (featureIndex == -1) {
                String message = "unknown token index. This token is not in the vocabulary! Check bns.pig for errors";
                log.error(message);
                throw new IncorrectLineFormatException(message);
            }
            String bnsScoreField = fields[1];
            double bnsScore = Double.parseDouble(bnsScoreField);
            features[featureIndex] = bnsScore;

            log.debug(String.format("Added feature (%d,%f) to vector.",
                    featureIndex, bnsScore));
        } catch (NumberFormatException nfe) {
            String message = nfe.toString();
            log.warn(message);
            throw new IncorrectLineFormatException(message);
        }
    }
View Full Code Here

TOP

Related Classes of com.fujitsu.ca.fic.exceptions.IncorrectLineFormatException

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.