コード例 #1
0
ファイル: FeatureCover.cs プロジェクト: m9ra/KnowledgeDialog
        internal FeatureCover(FeatureInstance feature, ParsedUtterance utterance)
        {
            OriginalUtterance = utterance;
            _coveredPositions = new bool[feature.MaxOriginPosition + 1];
            FeatureInstances  = new[] { feature };
            indexPositions(feature);

            FeatureKey = createFeatureKey();
        }
コード例 #2
0
ファイル: FeatureCover.cs プロジェクト: m9ra/KnowledgeDialog
        private FeatureCover(FeatureCover previousCover, FeatureInstance extendingFeature)
        {
            OriginalUtterance = previousCover.OriginalUtterance;
            _coveredPositions = previousCover._coveredPositions.ToArray();
            FeatureInstances  = previousCover.FeatureInstances.Concat(new[] { extendingFeature }).OrderBy(f => f.CoveredPositions.First()).ToArray();

            indexPositions(extendingFeature);

            FeatureKey = createFeatureKey();
        }