Skip to content

Commit

Permalink
Update GenericRecognizer.cs
Browse files Browse the repository at this point in the history
Issue #370 Separate the component count filter from the periodicity filter.
  • Loading branch information
towsey authored and atruskie committed Oct 14, 2020
1 parent c4b0113 commit 55ddfad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AnalysisPrograms/Recognizers/GenericRecognizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,14 @@ public override RecognizerResults Recognize(
{
// filter on number of components
var maxComponentCount = sequenceConfig.SyllableMaxCount;
allResults.NewEvents = EventFilters.FilterEventsOnCompositeContent(allResults.NewEvents, maxComponentCount);
allResults.NewEvents = EventFilters.FilterEventsOnComponentCount(allResults.NewEvents, maxComponentCount);
Log.Debug($"Event count after filtering on component count = {allResults.NewEvents.Count}");

// filter on syllable periodicity
var period = sequenceConfig.ExpectedPeriod;
var periodSd = sequenceConfig.PeriodStandardDeviation;
allResults.NewEvents = EventFilters.FilterEventsOnSyllablePeriodicity(allResults.NewEvents, period, periodSd);
Log.Debug($"Event count after filtering on component count = {allResults.NewEvents.Count}");
Log.Debug($"Event count after filtering on periodicity = {allResults.NewEvents.Count}");
}
}

Expand Down

0 comments on commit 55ddfad

Please sign in to comment.