コード例 #1
0
 public static void ReprocessEssenceItems4Homogeneous
     (OpinionMiningTuple opinionMiningTuple, ICoreferenceInfo coreferenceInfo /*, ObjectAllocateMethod objectAllocateMethod*/)
 {
     if (!opinionMiningTuple.Subject.IsAuthor)
     {
         ReprocessEssenceItems4Homogeneous(opinionMiningTuple.Subject, coreferenceInfo /*, objectAllocateMethod*/);
     }
     if (opinionMiningTuple.HasObject)
     {
         ReprocessEssenceItems4Homogeneous(opinionMiningTuple.Object, coreferenceInfo /*, objectAllocateMethod*/);
     }
 }
コード例 #2
0
        public static DigestTuple ToDigestTuple(this OpinionMiningTuple tuple
                                                , TonalityMarkingWcfService.OutputResult4DigestWcfService outputResult4DigestWcfService
                                                , InputParamsBase inputParams)
        {
            var result = new DigestTuple
                         (
                tuple,
                outputResult4DigestWcfService.Sentence.ToString(),
                //outputResult4DigestWcfService.Sentence.Convert2OutputFormat( inputParams ).ToString(),
                outputResult4DigestWcfService.Positive,
                outputResult4DigestWcfService.Negative
                         );

            return(result);
        }
コード例 #3
0
 public DigestTuple(OpinionMiningTuple other4Copy, string sentenceXml, double?positive, double?negative)
     : base(other4Copy, sentenceXml)
 {
     Positive = positive;
     Negative = negative;
 }
コード例 #4
0
 public DigestTuple(OpinionMiningTuple other4Copy, string sentenceXml)
     : base(other4Copy, sentenceXml)
 {
 }
コード例 #5
0
        /*
         * private static XElement Convert2OutputFormat( this XElement sent, InputParamsBase inputParams )
         * {
         *  inputParams.ThrowIfNull("inputParams");
         *  sent.ThrowIfNull("sent");
         *  sent.ThrowIfNotSent();
         *
         *  if ( inputParams.OutputXmlFormat == OutputXmlFormat.Compact )
         *  {
         *      sent = sent.ToCompactFormat();
         *  }
         *
         *  return (sent);
         * }
         * private static XElement ToCompactFormat( this XElement sent )
         * {
         *  return (Config.CompactOutputXmlFormatConverter.ConvertSent( sent ));
         * }
         *
         * public static DigestTuple ToDigestTuple( this OpinionMiningTuple tuple, InputParamsBase inputParams )
         * {
         *  var sentenceXml = default(string);
         *  if ( inputParams.OutputXmlFormat == OutputXmlFormat.Compact ) {
         *      sentenceXml = tuple.GetSentence().ToCompactFormat().ToString();
         *  } else {
         *      sentenceXml = tuple.SentenceText;
         *  }
         *
         *  return (new DigestTuple( tuple, sentenceXml ));
         * }
         */
        #endregion

        public static DigestTuple ToDigestTuple(this OpinionMiningTuple tuple)
        {
            return(new DigestTuple(tuple, tuple.SentenceText));
        }