public string GetPare(string name) { DictUnit unit = GetWordInDictByName(name); var list = unit.Exps; string paraphrase = null; for (int i = 0; i < list.Count; i++) { paraphrase += ("," + list[i].Parephrase); } return(paraphrase); }
//加载英汉词典 IEnumerator LoadDict(string url) { WWW www = new WWW(url); yield return(www); if (www.isDone) { string content = www.text; string[] map = content.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < map.Length; i++) { var unit = new DictUnit(map[i]); if (!dict.ContainsKey(unit.Word)) { dict.Add(unit.Word, unit); } //Debug.Log(unit.Word); } } }