src/core/preprocess/ReadTextFile.java
public static StringBuilder readText(String fileName, int skipRowsFromStart) throws FileNotFoundException {
        File file = new File(fileName);
        Scanner scanner = new Scanner(file);
        int countSkipRows = 0;
        StringBuilder text = new StringBuilder();
        while (scanner.hasNextLine()) {
            while (countSkipRows < skipRowsFromStart) {
                scanner.nextLine();
                countSkipRows++;
            }
            String line = scanner.nextLine();
            text.append(line).append(" ");
        }
        text = new StringBuilder(text.toString().toLowerCase());
        return text;
    }
/**
     * Read and returns text from file. Converts text to lower case.
     *
     * @param fileName file name
     * @param skipRowsFromStart number of rows skipped from start.
     * @return text from file.
     * @throws FileNotFoundException throws exception if file is not found.
     */
Read and returns text from file. Converts text to lower case.
@param fileName file name
@param skipRowsFromStart number of rows skipped from start.
@return text from file.
@throws FileNotFoundException throws exception if file is not found.
Read and returns text from file . Converts text to lower case . @param fileName file name @param skipRowsFromStart number of rows skipped from start . @return text from file . @throws FileNotFoundException throws exception if file is not found .
public static StringBuilder readText(String fileName, int skipRowsFromStart) throws FileNotFoundException {
        File file = new File(fileName);
        Scanner scanner = new Scanner(file);
        int countSkipRows = 0;
        StringBuilder text = new StringBuilder();
        while (scanner.hasNextLine()) {
            while (countSkipRows < skipRowsFromStart) {
                scanner.nextLine();
                countSkipRows++;
            }
            String line = scanner.nextLine();
            text.append(line).append(" ");
        }
        text = new StringBuilder(text.toString().toLowerCase());
        return text;
    }
public static StringBuilder readText ( String fileName , int skipRowsFromStart ) throws FileNotFoundException { File file = new File ( fileName ) ; Scanner scanner = new Scanner ( file ) ; int countSkipRows = 0 ; StringBuilder text = new StringBuilder ( ) ; while ( scanner . hasNextLine ( ) ) { while ( countSkipRows < skipRowsFromStart ) { scanner . nextLine ( ) ; countSkipRows ++ ; } String line = scanner . nextLine ( ) ; text . append ( line ) . append ( " " ) ; } text = new StringBuilder ( text . toString ( ) . toLowerCase ( ) ) ; return text ; }
Read and returns text from file.
Read and returns text from file .