public void Init(PluginInitContext context) { string CurrentPath = context.CurrentPluginMetadata.PluginDirectory; if (!Directory.Exists(Path.Combine(CurrentPath, "config"))) { Directory.CreateDirectory(Path.Combine(CurrentPath, "config")); } string ConfigFile = CurrentPath + "/config/config.json"; if (File.Exists(ConfigFile)) { settings = JsonConvert.DeserializeObject <Settings>(File.ReadAllText(ConfigFile)); } else { settings = new Settings(); } settings.ConfigFile = ConfigFile; ecdict = new ECDict(CurrentPath + "/dicts/ecdict.db"); wordCorrection = new WordCorrection(CurrentPath + "/dicts/frequency_dictionary_en_82_765.txt", settings.MaxEditDistance); synonyms = new Synonyms(settings.BighugelabsToken); iciba = new Iciba(settings.ICIBAToken); this.context = context; }