@Override
	public void run() {
		PlainSentence ps = null;
		
		try {
			while (true) {
				ps = in.take();
				
				if ((ps = plainTextProcessor.doProcess(ps)) != null) {
					out.add(ps);
				}
				
				while (plainTextProcessor.hasRemainingData()) {
					if ((ps = plainTextProcessor.doProcess(null)) != null) {
						out.add(ps);
					}
				}
				
				if ((ps = plainTextProcessor.flush()) != null) {
					out.add(ps);
				}
			}
		} catch (InterruptedException e) {
			plainTextProcessor.shutdown();
		}
	}