Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/SIL.LCModel/DomainServices/AnalysisGuessServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,12 @@ public bool UpdatingOccurrence(IAnalysis oldAnalysis, IAnalysis newAnalysis)
return result;
}

bool IsNotDisapproved(IWfiAnalysis wa)
bool IncludeAnalysis(IWfiAnalysis wa)
{
// Exclude human-disapproved analyses unless we are in Parsing Dev mode.
ICmAgentEvaluation cae = null;
if (PrioritizeParser)
return true;
foreach (var ae in wa.EvaluationsRC)
if (((ICmAgent)ae.Owner).Human)
cae = ae;
Expand Down Expand Up @@ -512,7 +515,7 @@ private IDictionary<IAnalysis, Dictionary<IAnalysis, PriorityCount>> GetAnalysis
// Include analyses that may not have been selected.
foreach (IWfiAnalysis analysis in wordform.AnalysesOC)
{
if (IsNotDisapproved(analysis))
if (IncludeAnalysis(analysis))
{
// Human takes priority over parser which takes priority over computer.
// Approved takes priority over disapproved.
Expand All @@ -538,7 +541,7 @@ private Dictionary<IAnalysis, Dictionary<IAnalysis, PriorityCount>> GetGlossCoun
{
var counts = new Dictionary<IAnalysis, Dictionary<IAnalysis, PriorityCount>>();
var segs = new HashSet<ISegment>();
if (!IsNotDisapproved(analysis))
if (!IncludeAnalysis(analysis))
return counts;
foreach (ISegment seg in analysis.Wordform.OccurrencesInTexts)
{
Expand Down
Loading