Takes the file, reads it in, and prints out the likelihood of each possible
label at each point.

@param filename
The path to the specified file
175435
public void printProbs(String filename,
                         DocumentReaderAndWriter<IN> readerAndWriter) {
    // only for the OCR data does this matter
    flags.ocrTrain = false;

    ObjectBank<List<IN>> docs =
      makeObjectBankFromFile(filename, readerAndWriter);
    printProbsDocuments(docs);
  }
83898
public void addLables(JKLocale locale, String fileName) {
		addLables(locale, JKIOUtil.readPropertiesFile(fileName));
	}
80307
public String read(final String filename) {
        if (isFresh(filename)) {
            String cachedValue = getFileFromCache(filename);
            if (cachedValue != null) {
                return cachedValue;
            }
        }
        // either fresh is false or cachedValue is null
        loadToCache(filename);
        return getFileFromCache(filename);
    }
668811
public void load(File... files) throws IOException {
        setFeatureStats(DistributionStats.load(files[0], files[1]));
        if (isFitLabel()) {
            setLabelStats(DistributionStats.load(files[2], files[3]));
        }
    }
691939
public static String readFile(String fileName) throws IOException {
        logger.entering(fileName);
        Preconditions.checkArgument(StringUtils.isNotBlank(fileName), "File name cannot be null (or) empty.");
        StringBuilder output = new StringBuilder();
        try (BufferedReader buffreader = new BufferedReader(new InputStreamReader(loadFile(fileName),
                Charset.forName("UTF-8")))) {
            String line = null;
            while ((line = buffreader.readLine()) != null) {
                output.append(line);
            }
        }
        logger.exiting(output);
        return output.toString();
    }
608205
public synchronized void reloadableScan(String fileName) {

        if (!isFirstInit) {
            return;
        }

        if (DisClientConfig.getInstance().ENABLE_DISCONF) {
            try {

                if (!DisClientConfig.getInstance().getIgnoreDisconfKeySet().contains(fileName)) {

                    if (scanMgr != null) {
                        scanMgr.reloadableScan(fileName);
                    }

                    if (disconfCoreMgr != null) {
                        disconfCoreMgr.processFile(fileName);
                    }
                    LOGGER.debug("disconf reloadable file: {}", fileName);
                }

            } catch (Exception e) {

                LOGGER.error(e.toString(), e);
            }
        }
    }
1115483
public static String parsePIDandLabel(String fileName) {
        if (fileName == null || fileName.isEmpty()) {
            return null;
        }
        int pidIndex = fileName.indexOf(TIMESEPARATOR);
        int labelIndex = fileName.indexOf(LABELSEPARATOR);

        // If no time separator or it's a part of the label the full name is the result
        if (pidIndex < 0 || (labelIndex > 0 && labelIndex < pidIndex)) {
            return fileName;
        }

        return fileName.substring(pidIndex + 1);
    }
43265
public void setLocation(String filename, int line) throws IOException
  {
    if (_lineMap != null && filename != null && line >= 0) {
      _lineMap.add(filename, line, _destLine, _isPreferLast);
    }
  }
303833
private static String readClasspathResource(String filename) {
        InputStream is = CreateEntities.class.getResourceAsStream(filename);
        if (is == null) {
            throw new IllegalArgumentException(
                    "Could not find the given file '" + filename + "' in the classpath.");
        }
        
        return readContents(is);
    }
389575
public synchronized void addFile(String filename, String filePath) {
        // fix this to check if duplicate name exists.
        int fileIndex = fileNameList.indexOf(filename);
        if (fileIndex == -1) {
            fileNameList.add(filename);
            filePathList.add(filePath);
        }
    }
258097
private static String readFile(final String fileName) throws IOException {
    return new String(Files.readAllBytes(Paths.get(fileName)), StandardCharsets.UTF_8);
  }
255989
public void loadProductQuantizer(String filename) throws Exception {
		productQuantizer = new double[numSubVectors][numProductCentroids][subVectorLength];
		BufferedReader in = new BufferedReader(new FileReader(new File(filename)));
		for (int i = 0; i < numSubVectors; i++) {
			for (int j = 0; j < numProductCentroids; j++) {
				String line = in.readLine();
				String[] centroidString = line.split(",");
				for (int k = 0; k < subVectorLength; k++) {
					productQuantizer[i][j][k] = Double.parseDouble(centroidString[k]);
				}
			}
		}
		in.close();
	}
408390
public static List<String> readLines(String filename) {
    List<String> lines = Lists.newArrayList();
    try {
      BufferedReader in = new BufferedReader(new FileReader(filename));
      String line;
      while ((line = in.readLine()) != null) {
        // Ignore blank lines.
        if (line.trim().length() > 0) {
          lines.add(line);
        }
      }
      in.close();
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
    return lines;
  }
448488
public void write(String filename)
	{
		try
		{
			write(new FileOutputStream(filename));
		}
		catch (FileNotFoundException e)
		{
			e.printStackTrace();
		}
	}
517976
public static Reader openFileReader(final String fileName) throws IOException
	{
		BufferedReader bufferedReader = null;
		final File file = new File(fileName);
		bufferedReader = (BufferedReader)StreamExtensions.getReader(file);
		return bufferedReader;
	}
628764
public static String getFileExt(String fileName) {
        int dotPos = fileName.lastIndexOf('.');
        if (dotPos != -1 && dotPos != fileName.length() - 1) {
            return fileName.substring(dotPos);
        } else {
            return null;
        }
    }
1359355
public void parse(final String filename, final File dir) {
        filePath = stripFragment(filename);
        dirPath = dir;
        try {
            final File f = new File(dir, filePath);
            reader.setErrorHandler(new DITAOTXMLErrorHandler(f.getAbsolutePath(), logger));
            logger.info("Processing " + f.getAbsolutePath());
            reader.parse(f.toURI().toString());
        } catch (final RuntimeException e) {
            throw e;
        } catch (final Exception e) {
            throw new RuntimeException("Failed to parse " + filename + ": " + e.getMessage(), e);
        }
    }