Пример #1
0
        private void MakeLabel()
        {
            JPCommonNode tNode = m_Head;

            // initialize
            if (m_Label != null)
            {
                m_Label.Clear();
            }
            else
            {
                m_Label = new JPCommonLabel();
            }

            m_Label.Initialize();

            // push word
            for (tNode = m_Head; tNode != null; tNode = tNode.next)
            {
                m_Label.Push
                (
                    tNode.Pron,
                    tNode.Pos,
                    tNode.CType,
                    tNode.CForm,
                    tNode.Acc,
                    tNode.ChainFlag
                );
            }

            // make label
            m_Label.make();
        }
Пример #2
0
        public void Initialize()
        {
            this.Pron      = null;
            this.Pos       = null;
            this.CType     = null;
            this.CForm     = null;
            this.Acc       = 0;
            this.ChainFlag = -1;

            this.prev = null;
            this.next = null;
        }
Пример #3
0
        //---------------------------------------------------------------------------

        private void Push(JPCommonNode tNode)
        {
            if (m_Head == null)
            {
                m_Head = tNode;
            }
            else
            {
                m_Tail.next = tNode;
                tNode.prev  = m_Tail;
            }
            m_Tail = tNode;
        }
Пример #4
0
        //-------------------------------------------------------------------------------------------

        public string[] Analyze(NJD njd)
        {
            NJDNode      tINode;
            JPCommonNode tJNode;
            string       tToken;

            for (tINode = njd.head; tINode != null; tINode = tINode.next)
            {
//				Debug.LogWarning( "Node:" + inode.Word ) ;
//				Debug.LogWarning( "Pron:" + inode.Pron ) ;


                tJNode = new JPCommonNode();

                tJNode.Pron = tINode.Pron;

                ConvertPos(out tToken, tINode.Pos, tINode.PosGroup1, tINode.PosGroup2, tINode.PosGroup3);
                tJNode.Pos = tToken;

                ConvertCType(out tToken, tINode.CType);
                tJNode.CType = tToken;

                ConvertCForm(out tToken, tINode.CForm);
                tJNode.CForm = tToken;

                tJNode.Acc       = tINode.Acc;
                tJNode.ChainFlag = tINode.ChainFlag;

                Push(tJNode);
            }

            MakeLabel();

            //----------------------------------------------------------

            if (GetLabelSize() <= 2)
            {
                return(null);
            }

            return(GetLabelFeature());
        }
Пример #5
0
 public void Initialize()
 {
     m_Head  = null;
     m_Tail  = null;
     m_Label = null;
 }