From 856e2994722e2e7f67b47d55b8e673ddabcebe83 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 27 Feb 2026 07:13:17 +0000 Subject: feat: Initial commit --- internal/analyze/resources.go | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 internal/analyze/resources.go (limited to 'internal/analyze/resources.go') diff --git a/internal/analyze/resources.go b/internal/analyze/resources.go new file mode 100644 index 0000000..f42c757 --- /dev/null +++ b/internal/analyze/resources.go @@ -0,0 +1,26 @@ +package analyze + +import ( + "fmt" + "github.com/Fuwn/kivia/internal/nlp" +) + +type resources struct { + dictionary *nlp.Dictionary +} + +func getResources() (resources, error) { + return loadResources() +} + +func loadResources() (resources, error) { + dictionary, err := nlp.NewDictionary() + + if err != nil { + return resources{}, fmt.Errorf("Failed to load dictionary: %w", err) + } + + return resources{ + dictionary: dictionary, + }, nil +} -- cgit v1.2.3