예제 #1
0
        internal FeatureCover(FeatureInstance feature, ParsedUtterance utterance)
        {
            OriginalUtterance = utterance;
            _coveredPositions = new bool[feature.MaxOriginPosition + 1];
            FeatureInstances  = new[] { feature };
            indexPositions(feature);

            FeatureKey = createFeatureKey();
        }
예제 #2
0
        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();
        }