class TranslatorImp implements Translator {

	public List<Verbal> index(Analyzer analyzer, String mixedString) {
		List<Verbal> verbals = new CopyOnWriteArrayList<>();
		List<String> nodes = analyzer.parserMixedString(mixedString.toLowerCase());
		Iterator<String> it = nodes.iterator();
		while(it.hasNext()) {
			String word = it.next();
			Verbal verbal = new Verbal();
			if(poscc.containsKey(word)) {
				verbal.setChinese(word);
				verbal.setPartOfSpeech(poscc.get(word));
				if(cte.containsKey(word)) {
					verbal.setEnglish(cte.get(word));
					if(etc.containsKey(cte.get(word))) {
						verbal.setExplain(etc.get(cte.get(word)));
					}
				}else if(fullcte.containsKey(word)){
					verbal.setEnglish(fullcte.get(word));
					verbal.setExplain(fullcte.get(word));
				}
			}else if(posee.containsKey(word)) {
				verbal.setEnglish(word);
				if(fulletc.containsKey(word)) {
					verbal.setChinese(fulletc.get(word));
				}
				if(poscc.containsKey(fulletc.get(word))) {
					verbal.setPartOfSpeech(poscc.get(fulletc.get(word)));
				}
				if(etc.containsKey(word)) {
					verbal.setExplain(etc.get(word));
				}
			}else {
				verbal.setEnglish(word);
				verbal.setChinese(fulletc.get(word));
				verbal.setPartOfSpeech(StableData.NLP_NULL);
				verbal.setExplain(StableData.NLP_NULL);
			}	
			verbals.add(verbal);
		}
		return verbals;
	}

}