-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.rb
37 lines (33 loc) · 1.33 KB
/
config.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require_relative 'lib/configuration'
require_relative 'lib/file_access'
require 'pathname'
require 'yaml'
here = Pathname __dir__
config = {
words_count: 5_000,
deck_name: 'Serbian en.wiktionary GPT',
fetch_new_examples: false, # NOTE: `false` means only already cached examples are used or empty text otherwise
trans: Configuration.new(
cache_dir: here + 'cache',
fetch_pause: 2, # sec.
),
usage: Configuration.new(
cache_dir: here + 'cache', # I wonder if adding implicit inheritance of a kind could play well here
fetch_pause: 10, # sec.
command: 'chatgpt', # - for ChatGPT through chatgpt-wrapper
#command: File.expand_path('~/go/bin/cligpt'), # - for Davinci through cligpt instead, no need for pause then
),
wiktionary: Configuration.new(
cache_dir: here + 'cache',
language: 'Serbo-Croatian',
),
file: Configuration.new(
input: FileAccess.provide(here + 'data/sr_50k.txt'),
generated_blacklist: FileAccess.provide(here + 'data/generated_blacklist.yml', YAML),
manual_blacklist: FileAccess.provide(here + 'data/manual_blacklist.yml', YAML),
words: FileAccess.provide(here + 'data/words.yml', YAML),
deck_yaml: FileAccess.provide(here + 'data/deck.yml', YAML),
deck_anki: FileAccess.provide(here + 'data/Serbian-en-Wiktionary-GPT.apkg'),
),
}
Config = Configuration.new config