Implemented the initial Go framework
This commit is contained in:
23
internal/builtin/registry.go
Normal file
23
internal/builtin/registry.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package builtin
|
||||
|
||||
import "gitea.maximumdirect.net/eric/seriatim/internal/pipeline"
|
||||
|
||||
// NewRegistry registers the MVP built-in modules.
|
||||
func NewRegistry() *pipeline.Registry {
|
||||
registry := pipeline.NewRegistry()
|
||||
|
||||
registry.RegisterInputReader(jsonFilesReader{})
|
||||
registry.RegisterPreprocessor(noopPreprocessor{name: "validate-raw", requires: pipeline.StateRaw, produces: pipeline.StateRaw})
|
||||
registry.RegisterPreprocessor(normalizeSpeakers{})
|
||||
registry.RegisterPreprocessor(noopPreprocessor{name: "trim-text", requires: pipeline.StateCanonical, produces: pipeline.StateCanonical})
|
||||
registry.RegisterPreprocessor(noopPreprocessor{name: "autocorrect", requires: pipeline.StateCanonical, produces: pipeline.StateCanonical})
|
||||
registry.RegisterMerger(placeholderMerger{})
|
||||
registry.RegisterPostprocessor(noopPostprocessor{name: "detect-overlaps"})
|
||||
registry.RegisterPostprocessor(noopPostprocessor{name: "resolve-overlaps"})
|
||||
registry.RegisterPostprocessor(assignIDs{})
|
||||
registry.RegisterPostprocessor(noopPostprocessor{name: "validate-output"})
|
||||
registry.RegisterPostprocessor(noopPostprocessor{name: "autocorrect"})
|
||||
registry.RegisterOutputWriter(jsonOutputWriter{})
|
||||
|
||||
return registry
|
||||
}
|
||||
Reference in New Issue
Block a user