code-review-fix task 12.12: remove dead no-op filter code from page.tsx
This commit is contained in:
parent
5ffab3ef44
commit
9d3cf2aeb2
2 changed files with 4 additions and 10 deletions
|
|
@ -56,15 +56,9 @@ function detectDisagreements(
|
|||
const matchedHumanIds = new Set<number>();
|
||||
const matchedPredictionIndices = new Set<number>();
|
||||
|
||||
// Filter human spans to only those with a source of "human" (not programmatic)
|
||||
const humanOnlySpans = humanSpans.filter(span => {
|
||||
// Assuming human-created spans don't have a source field or have source="human"
|
||||
// This will be properly implemented when we add the source field
|
||||
return true; // For now, consider all spans
|
||||
});
|
||||
|
||||
// Find matches and label mismatches
|
||||
humanOnlySpans.forEach((humanSpan) => {
|
||||
humanSpans.forEach((humanSpan) => {
|
||||
predictionSpans.forEach((predSpan, predIdx) => {
|
||||
const overlap = calculateOverlap(
|
||||
humanSpan.start_time,
|
||||
|
|
@ -96,7 +90,7 @@ function detectDisagreements(
|
|||
});
|
||||
|
||||
// Find spans missed by model (human annotation but no prediction)
|
||||
humanOnlySpans.forEach((humanSpan) => {
|
||||
humanSpans.forEach((humanSpan) => {
|
||||
if (!matchedHumanIds.has(humanSpan.id)) {
|
||||
disagreements.push({
|
||||
type: 'missed_by_model',
|
||||
|
|
@ -125,7 +119,7 @@ function detectDisagreements(
|
|||
|
||||
return {
|
||||
total_predictions: predictionSpans.length,
|
||||
total_human_annotations: humanOnlySpans.length,
|
||||
total_human_annotations: humanSpans.length,
|
||||
agreements,
|
||||
disagreements,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue