Remove confidence scoring and refine correction prompts
This commit is contained in:
@@ -13,7 +13,6 @@ var builtInChains = map[string][]string{
|
||||
KeyProposalShape,
|
||||
KeyNoEffect,
|
||||
KeyOriginalTextPresence,
|
||||
KeyConfidenceThreshold,
|
||||
KeyProtectedTerms,
|
||||
KeyNonEmptyResultingSegment,
|
||||
KeySpokenFormPlausibility,
|
||||
@@ -23,7 +22,6 @@ var builtInChains = map[string][]string{
|
||||
KeyProposalShape,
|
||||
KeyNoEffect,
|
||||
KeyOriginalTextPresence,
|
||||
KeyConfidenceThreshold,
|
||||
KeyProtectedTerms,
|
||||
KeyNonEmptyResultingSegment,
|
||||
KeySpokenFormPlausibility,
|
||||
@@ -33,7 +31,6 @@ var builtInChains = map[string][]string{
|
||||
KeyProposalShape,
|
||||
KeyNoEffect,
|
||||
KeyOriginalTextPresence,
|
||||
KeyConfidenceThreshold,
|
||||
KeyProtectedTerms,
|
||||
KeyNonEmptyResultingSegment,
|
||||
KeyEditorialReview,
|
||||
@@ -43,7 +40,6 @@ var builtInChains = map[string][]string{
|
||||
KeyProposalShape,
|
||||
KeyNoEffect,
|
||||
KeyOriginalTextPresence,
|
||||
KeyConfidenceThreshold,
|
||||
KeyProtectedTerms,
|
||||
KeyNonEmptyResultingSegment,
|
||||
KeyEditorialReview,
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package confidence_threshold
|
||||
|
||||
import (
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/contracts"
|
||||
frameworkvalidators "gitea.maximumdirect.net/eric/audita/v3/internal/framework/validators"
|
||||
validatormetadata "gitea.maximumdirect.net/eric/audita/v3/internal/validators/metadata"
|
||||
)
|
||||
|
||||
const Key = "confidence_threshold"
|
||||
|
||||
func New() (contracts.Validator, error) {
|
||||
return validatormetadata.Wrap(frameworkvalidators.ConfidenceThresholdValidator{}, validatormetadata.ExecutionClassDeterministic), nil
|
||||
}
|
||||
@@ -15,7 +15,6 @@ const (
|
||||
|
||||
const (
|
||||
KeyProposalShape = "proposal_shape"
|
||||
KeyConfidenceThreshold = "confidence_threshold"
|
||||
KeyOriginalTextPresence = "original_text_presence"
|
||||
KeyNonEmptyResultingSegment = "non_empty_resulting_segment"
|
||||
KeyNoEffect = "no_effect"
|
||||
@@ -28,7 +27,6 @@ const (
|
||||
|
||||
var executionClassByKey = map[string]ExecutionClass{
|
||||
KeyProposalShape: ExecutionClassDeterministic,
|
||||
KeyConfidenceThreshold: ExecutionClassDeterministic,
|
||||
KeyOriginalTextPresence: ExecutionClassDeterministic,
|
||||
KeyNonEmptyResultingSegment: ExecutionClassDeterministic,
|
||||
KeyNoEffect: ExecutionClassDeterministic,
|
||||
|
||||
@@ -17,7 +17,6 @@ func proposal(index int, moduleKey, original, corrected string) proposals.Enrich
|
||||
TargetSegmentID: 1,
|
||||
OriginalText: original,
|
||||
CorrectedText: corrected,
|
||||
Confidence: 0.95,
|
||||
},
|
||||
ProposalMetadata: proposals.ProposalMetadata{
|
||||
ProposalIndex: index,
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"strings"
|
||||
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/contracts"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/validators/confidence_threshold"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/validators/editorial_review"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/validators/meaning_reversal_review"
|
||||
validatormetadata "gitea.maximumdirect.net/eric/audita/v3/internal/validators/metadata"
|
||||
@@ -19,7 +18,6 @@ import (
|
||||
|
||||
const (
|
||||
KeyProposalShape = validatormetadata.KeyProposalShape
|
||||
KeyConfidenceThreshold = validatormetadata.KeyConfidenceThreshold
|
||||
KeyOriginalTextPresence = validatormetadata.KeyOriginalTextPresence
|
||||
KeyNonEmptyResultingSegment = validatormetadata.KeyNonEmptyResultingSegment
|
||||
KeyNoEffect = validatormetadata.KeyNoEffect
|
||||
@@ -42,7 +40,6 @@ type Registry struct {
|
||||
func NewBuiltInRegistry() *Registry {
|
||||
defs := []BuiltInValidatorDefinition{
|
||||
{Key: KeyProposalShape, Build: proposal_shape.New},
|
||||
{Key: KeyConfidenceThreshold, Build: confidence_threshold.New},
|
||||
{Key: KeyOriginalTextPresence, Build: original_text_presence.New},
|
||||
{Key: KeyNonEmptyResultingSegment, Build: non_empty_resulting_segment.New},
|
||||
{Key: KeyNoEffect, Build: no_effect.New},
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/core/modulecatalog"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/contracts"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/proposals"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/validators/confidence_threshold"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/validators/editorial_review"
|
||||
"gitea.maximumdirect.net/eric/audita/v3/internal/validators/meaning_reversal_review"
|
||||
validatormetadata "gitea.maximumdirect.net/eric/audita/v3/internal/validators/metadata"
|
||||
@@ -24,7 +23,6 @@ func TestBuiltInRegistryRegistersAllKeys(t *testing.T) {
|
||||
r := NewBuiltInRegistry()
|
||||
for _, key := range []string{
|
||||
KeyProposalShape,
|
||||
KeyConfidenceThreshold,
|
||||
KeyOriginalTextPresence,
|
||||
KeyNonEmptyResultingSegment,
|
||||
KeyNoEffect,
|
||||
@@ -56,7 +54,6 @@ func TestBuiltInValidatorPackagesConstruct(t *testing.T) {
|
||||
}
|
||||
cases := []validatorCtor{
|
||||
{name: "proposal_shape", key: KeyProposalShape, build: proposal_shape.New, wantClass: validatormetadata.ExecutionClassDeterministic},
|
||||
{name: "confidence_threshold", key: KeyConfidenceThreshold, build: confidence_threshold.New, wantClass: validatormetadata.ExecutionClassDeterministic},
|
||||
{name: "original_text_presence", key: KeyOriginalTextPresence, build: original_text_presence.New, wantClass: validatormetadata.ExecutionClassDeterministic},
|
||||
{name: "non_empty_resulting_segment", key: KeyNonEmptyResultingSegment, build: non_empty_resulting_segment.New, wantClass: validatormetadata.ExecutionClassDeterministic},
|
||||
{name: "no_effect", key: KeyNoEffect, build: no_effect.New, wantClass: validatormetadata.ExecutionClassDeterministic},
|
||||
@@ -128,7 +125,6 @@ func TestRegistryProtectedTermsUsesNonGlossaryStageBehavior(t *testing.T) {
|
||||
TargetSegmentID: 1,
|
||||
OriginalText: "Jesters",
|
||||
CorrectedText: "Gestures",
|
||||
Confidence: 1.0,
|
||||
},
|
||||
ProposalMetadata: proposals.ProposalMetadata{
|
||||
ProposalIndex: 0,
|
||||
@@ -176,7 +172,6 @@ func TestResolveBuiltInChainUsesGlossaryStageProtectedTermsBehavior(t *testing.T
|
||||
TargetSegmentID: 1,
|
||||
OriginalText: "Jesters",
|
||||
CorrectedText: "Gestures",
|
||||
Confidence: 1.0,
|
||||
},
|
||||
ProposalMetadata: proposals.ProposalMetadata{
|
||||
ProposalIndex: 0,
|
||||
|
||||
Reference in New Issue
Block a user