public Text parse(String pathToFile) {
        Text text = null;
        try {
            FileInputStream fstream = new FileInputStream(pathToFile);
            BufferedReader br = new BufferedReader(new InputStreamReader(fstream));

            ResourceBundle bundle;
            bundle = ResourceBundle.getBundle(ApplicationValue.BUNDLE_LOCATION);

            String textLine;
            text = new Text();
            while ((textLine = br.readLine()) != null) {
                if ((textLine.matches(bundle.getString(ApplicationValue.HEADER))
                        || (textLine.trim().matches(bundle.getString(ApplicationValue.OUTPUT))))) {
                    text.add(splitSentenceByWordsAndPunctuation(textLine));
                } else { //split to sentences
                    if (isCode(textLine)) {//listing check
                        text.add(new Listing(textLine));
                    } else {
                        Pattern sentencePattern = Pattern.compile(bundle.getString(ApplicationValue.SENTENCE));
                        Matcher sentenceMatcher = sentencePattern.matcher(textLine);
                        while (sentenceMatcher.find()) {
                            String sentenceString = sentenceMatcher.group();
                            text.add(splitSentenceByWordsAndPunctuation(sentenceString));
                        }
                    }
                }

            }
        } catch (IOException e) {
            log.error(e);
        }
        return text;
    }