@Override
	public SetOfSentences doProcess(SetOfSentences sos) {
		ArrayList<Eojeol[]> eojeolSetArray = sos.getEojeolSetArray();
		ArrayList<Eojeol[]> resultSetArray = new ArrayList<Eojeol[]>();
		
		int len = eojeolSetArray.size();
		String prevTag = null;
		boolean changed = false;
		
		for (int pos = 0; pos < len; pos++) {
			Eojeol[] eojeolSet = eojeolSetArray.get(pos);
			dupFilterMap.clear();
			
			for (int i = 0; i < eojeolSet.length; i++) {
				String[] tags = eojeolSet[i].getTags();
				prevTag = "";
				changed = false;
				
				for (int j = 0; j < tags.length; j++) {
					tags[j] = TagMapper.getKaistTagOnLevel(tags[j], TAG_LEVEL);
					
					if (tags[j].equals(prevTag)) {
						changed = true;
					}
					prevTag = tags[j];
				}
				
				if (changed) {
					tagList.clear();
					morphemeList.clear();
					String[] morphemes = eojeolSet[i].getMorphemes();
					
					for (int j = 0; j < tags.length - 1; j++) {
						if (tags[j].equals(tags[j+1])) {
							morphemes[j+1] = morphemes[j] + morphemes[j+1];
						} else {
							tagList.add(tags[j]);
							morphemeList.add(morphemes[j]);
						}
					}
					tagList.add(tags[tags.length - 1]);
					morphemeList.add(morphemes[morphemes.length - 1]);
				
					eojeolSet[i] = new Eojeol(morphemeList.toArray(new String[0]), tagList.toArray(new String[0]));
				}
				
				String key = eojeolSet[i].toString();
				if (!dupFilterMap.containsKey(key)) {
					dupFilterMap.put(key, eojeolSet[i]);
				}
			}
			if (eojeolSet.length != dupFilterMap.size()) {
				resultSetArray.add(dupFilterMap.values().toArray(new Eojeol[0]));
			} else {
				resultSetArray.add(eojeolSet);
			}
		}
		
		sos.setEojeolSetArray(resultSetArray);
		return sos;
	}