Пример #1
0
        public void addElementaryAttribut(string word, string notOperation, IWord inWord)
        {
            ElementaryAttribut attribut = new ElementaryAttribut(notOperation, word, inWord);

            attributSequence.Add(attribut);
            parentEp.getString();
        }
Пример #2
0
        public void addBreaksOfAttributs(ElementaryAttribut attribut1, ElementaryAttribut attribut2, string operationBetween)
        {
            Brackets br = new Brackets(attribut1, attribut2, operationBetween);

            attributSequence.Add(br);
            parentEp.getString();
        }
Пример #3
0
 public Brackets(ElementaryAttribut atribut1, ElementaryAttribut atribut2, string operationBetween)
 {
     this.atribut1         = atribut1;
     this.atribut2         = atribut2;
     this.operationBetween = operationBetween;
     unionsForAttr2        = new List <IOperationStructure>();
     operators             = new List <string>();
 }
Пример #4
0
 public ElementaryAttribut exqludeElementaryAtt(string word)
 {
     for (int i = 0; i < attributSequence.Count; i++)
     {
         try{
             if ((attributSequence[i] as ElementaryAttribut).word == word)
             {
                 ElementaryAttribut ret = (attributSequence[i] as ElementaryAttribut);
                 exqludedAttributsSequence.Add(attributSequence[i]);
                 attributSequence.RemoveAt(i);
                 return(ret);
             }
         }catch (Exception e) {}
     }
     return(null);
 }
Пример #5
0
        /// <summary>
        /// Добавление атрибута с предпроверкой добавлять ли его в последовательность атрибутов или же уточнять брэкет
        /// </summary>
        /// <param name="word"></param>
        /// <param name="notOperation"></param>
        /// <param name="operetionBefore"></param>
        /// <param name="wordNomber"></param>
        /// <param name="sent"></param>
        /// <param name="attr"></param>

        public void addElementaryAttribut(string word, string notOperation, IWord inWord, string operetionBefore, int saverWordNomber, ISentence sent, LongOperationAttribut attr)
        {
            int brNo = isBrecket(saverWordNomber, sent, attr);
            ElementaryAttribut attribut = new ElementaryAttribut(notOperation, word, inWord);

            if (brNo != -1)
            {
                //уточнить брэкет
                (attr.attributSequence[brNo] as Brackets).addUnionToAttr2(attribut, operetionBefore);
            }
            else
            {
                //просто добавляем новый элемент в последовательность
                attributSequence.Add(attribut);
                operators.Add(operetionBefore);
                parentEp.getString();
            }
        }
Пример #6
0
 public void addElementaryAttribut(ElementaryAttribut attribut)
 {
     attributSequence.Add(attribut);
     parentEp.getString();
 }