Exemplo n.º 1
0
        public static void TestGenerateWordNet()
        {
            WordDictionary coreDict = new WordDictionary();

            if (!coreDict.Load(coreDictFile))
            {
                Console.WriteLine("字典装入错误!");
                return;
            }

            string sSentence = @"人民币现在很值钱";

            sSentence = Predefine.SENTENCE_BEGIN + sSentence + Predefine.SENTENCE_END;

            List <AtomNode> atomSegment = Segment.AtomSegment(sSentence);
            RowFirstDynamicArray <ChainContent> m_segGraph = Segment.GenerateWordNet(atomSegment, coreDict);

            Console.WriteLine(m_segGraph.ToString());
        }
 private void OnPersonAndPlaceRecognition(RowFirstDynamicArray<ChainContent> m_graphOptimum)
 {
    SendEvents(new SegmentEventArgs(SegmentStage.PersonAndPlaceRecognition, m_graphOptimum.ToString()));
 }
Exemplo n.º 3
0
 private void OnOptimumSegment(RowFirstDynamicArray<ChainContent> m_graphOptimum)
 {
     SendEvents(new SegmentEventArgs(SegmentStage.OptimumSegment, m_graphOptimum.ToString()));
 }
Exemplo n.º 4
0
 private void OnGenSegGraph(RowFirstDynamicArray<ChainContent> segGraph)
 {
     SendEvents(new SegmentEventArgs(SegmentStage.GenSegGraph, segGraph.ToString()));
 }