diff options
| author | Fuwn <[email protected]> | 2026-02-27 07:13:17 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-27 07:13:17 +0000 |
| commit | 856e2994722e2e7f67b47d55b8e673ddabcebe83 (patch) | |
| tree | 5a4e108384038eaa072d8e6c5f71ab68901fb431 /internal/analyze/resources.go | |
| download | kivia-main.tar.xz kivia-main.zip | |
Diffstat (limited to 'internal/analyze/resources.go')
| -rw-r--r-- | internal/analyze/resources.go | 26 |
1 files changed, 26 insertions, 0 deletions
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 +} |