public void UpdateCountsFromSingleResult(DiscoveryDifference dd)
        {
            if (dd.Type != m_type)
                return;

            if (dd.OriginalCount > 0 && dd.APICount == 0 && dd.LightSpeedCount == 0)
            {
                ++m_iBothPerfect;
            }
            else if (dd.APICount == dd.LightSpeedCount)
            {
                ++m_iBothTheSame;
            }
            else if (dd.APICount > dd.LightSpeedCount)
            {
                ++m_iLightSpeedDidBetter;
            }
            else if (dd.LightSpeedCount > dd.APICount)
            {
                ++m_iAPIDidBetter;
            }
            else
            {
                ++m_iOther;
            }
        }
Example #2
0
 public void UpdateFromSingleResult(DiscoveryDifference dd)
 {
     foreach (ResultByMetadataType iter in m_listResultsByType)
     {
         if(iter.MetadataType == dd.Type)
         {
             iter.UpdateCountsFromSingleResult(dd);
             break;
         }
     }
 }
Example #3
0
        public List<DiscoveryDifference> DifferenceTo(DocumentText dtAPI, DocumentText dtBin)
        {
            List<DiscoveryDifference> Diffs = new List<DiscoveryDifference>();
            foreach (ContentType ttType in SingleFileCleaningTester.GetListOfAllContentTypes())
            {
                if (ttType == ContentType.Paragraph)
                    continue;

                int iOriginalCount = 0;
                foreach (IAbstractTextType ttOrig in m_dtMe.GetTextTypes())
                {
                    if (ttOrig.GetContentType() == ttType)
                    {
                        iOriginalCount = ttOrig.GetChildCount();
                        break;
                    }
                }
                
                // Hopefully safe to assume we did not find more in the cleaned document
                int iACount = 0;
                foreach (IAbstractTextType ttAPI in dtAPI.GetTextTypes())
                {
                    if (ttAPI.GetContentType() == ttType)
                    {
                        iACount = ttAPI.GetChildCount();
                        break;
                    }
                }
                int iBCount = 0;
                IAbstractTextType ttBinType = null;
                foreach (IAbstractTextType ttBin in dtBin.GetTextTypes())
                {
                    if (ttBin.GetContentType() == ttType)
                    {
                        iBCount = ttBin.GetChildCount();
                        ttBinType = ttBin;
                        break;
                    }
                }

                bool bIsExpected = IsExpectedFromRedaction(ttBinType);

                DiscoveryDifference Diff = new DiscoveryDifference(ttType, iOriginalCount, iACount, iBCount, bIsExpected);
                Diffs.Add(Diff);
            }
            return Diffs;
        }