code: public String process(File infile){		
  		try {
  			BufferedReader reader = new BufferedReader(new InputStreamReader(
  					new FileInputStream(infile), "UTF-8"));
  			
  			String line, data = "";
  			while((line = reader.readLine()) != null){
  				data += line + "\n";				
  			}
  			reader.close();
  			
  			String ret =  process(data);
  			return ret;
  		}
  		catch (Exception e){
  			System.out.println(e.getMessage());
  			e.printStackTrace();
  			return "";
  		}
  	}
docs: Process a file and return the processed text
  pipeline : sentence segmentation, tokenization, tone recover, word segmentation.
  
  @param infile data file
  @return processed text