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 matchedHumanIds = new Set<number>();
|
||||||
const matchedPredictionIndices = 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
|
// Find matches and label mismatches
|
||||||
humanOnlySpans.forEach((humanSpan) => {
|
humanSpans.forEach((humanSpan) => {
|
||||||
predictionSpans.forEach((predSpan, predIdx) => {
|
predictionSpans.forEach((predSpan, predIdx) => {
|
||||||
const overlap = calculateOverlap(
|
const overlap = calculateOverlap(
|
||||||
humanSpan.start_time,
|
humanSpan.start_time,
|
||||||
|
|
@ -96,7 +90,7 @@ function detectDisagreements(
|
||||||
});
|
});
|
||||||
|
|
||||||
// Find spans missed by model (human annotation but no prediction)
|
// Find spans missed by model (human annotation but no prediction)
|
||||||
humanOnlySpans.forEach((humanSpan) => {
|
humanSpans.forEach((humanSpan) => {
|
||||||
if (!matchedHumanIds.has(humanSpan.id)) {
|
if (!matchedHumanIds.has(humanSpan.id)) {
|
||||||
disagreements.push({
|
disagreements.push({
|
||||||
type: 'missed_by_model',
|
type: 'missed_by_model',
|
||||||
|
|
@ -125,7 +119,7 @@ function detectDisagreements(
|
||||||
|
|
||||||
return {
|
return {
|
||||||
total_predictions: predictionSpans.length,
|
total_predictions: predictionSpans.length,
|
||||||
total_human_annotations: humanOnlySpans.length,
|
total_human_annotations: humanSpans.length,
|
||||||
agreements,
|
agreements,
|
||||||
disagreements,
|
disagreements,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue