Ejemplo n.º 1
0
        public void LearnFrom(SpaceDocumentModel learnFrom, ILogBuilder log, Boolean learnCompleteTreeStructure)
        {
            name          = learnFrom.name;
            documentScope = learnFrom.documentScope;

            foreach (SpaceDocumentModel m in learnFrom.GetLeafs())
            {
                terms.MergeDictionary(m.terms);
                termsChildCount.CountTokens(m.terms.GetTokens());
            }

            foreach (SpaceDocumentModel m in learnFrom.Children)
            {
                SpaceDocumentStatsModel statChild = new SpaceDocumentStatsModel(m.name, log);

                if (learnCompleteTreeStructure)
                {
                    statChild.LearnFrom(m, log, learnCompleteTreeStructure);
                }

                Children.Add(statChild);
            }
        }