コード例 #1
0
        public static bool IsVerbCollocation(this Collocations collocationType)
        {
            switch (collocationType)
            {
            case Collocations.collvNeg:
            case Collocations.collvPos:
            case Collocations.collvNeut:
                return(true);

            default:
                return(false);
            }
        }
コード例 #2
0
        public static string ToText(this Collocations collocationType)
        {
            return(collocationType.ToString());

            /*switch ( collocationType )
             * {
             *  case Collocations.amplificator: return ("collAmplf");
             *  case Collocations.negative:     return ("collNeg");
             *  case Collocations.positive:     return ("collPos");
             *  case Collocations.Neut:      return (NEUTRAL);
             *  default:
             *      throw (new ArgumentException(collocationType.ToString()));
             * }*/
        }
コード例 #3
0
        public static XElement CreateAndAddBeforeVerb4Collocation(this XElement element, Collocations collocationsType, int weight)
        {
            var entity = new XElement(Consts.VERB_ELEMENT);

            entity.SetAttributeTYPE(TypeAttributeValue.Collocation);
            entity.SetAttributeSNT(collocationsType);
            entity.SetAttributeFRT(weight);

            element.AddBeforeSelf(entity);

            return(entity);
        }