private void addWordsToMap(String lineOfFile){
        if(lineOfFile == null){
            System.out.println("null file");
            return;
        }
        StringBuilder sb = new StringBuilder();

        for(int i = 0 ; i < lineOfFile.length(); i++){

            if(Character.isAlphabetic(lineOfFile.charAt(i))){
                sb.append(lineOfFile.charAt(i));
                if(i==(lineOfFile.length()-1)){
                    putValueToMap(sb.toString());
                    sb = new StringBuilder();
                }
            }else{
                if(sb.length()>0){
                    putValueToMap(sb.toString());
                    sb = new StringBuilder();
                }
            }
        }
    }