/// <summary> /// 获取实体关系 /// </summary> /// <param name="fileName"></param> public void Debug_GetAllEntityRelationship(string fileName) { string allText = File.ReadAllText(fileName, Encoding.UTF8); Text.Segment.IctclasSegment segment = Text.Segment.IctclasSegment.GetInstance(); string[] text = allText.Split(new[] { ",", ",", ".", "。", "!", "!" }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < text.Length; i++) { Tuple <string[], string[]> tuple = segment.SplitToArray(text[0]); } Console.WriteLine(segment.splitWithSemantic(allText)); }
private Semantic() { _dictionary = new Hashtable(); _semanticAttributes = new Hashtable(); LoadDictionary("Chinese Dictionary.txt"); LoadSemanticRank("Init\\SemanticAttribute.txt"); segment = Text.Segment.IctclasSegment.GetInstance(); }