protected override DawgSearchableIndex CreateIndex(string[][] corpus) { var buildableIndex = new DawgBuildableIndex(); IndexHelper.BuildIndex(buildableIndex, corpus); return(buildableIndex.Build()); }
static void BuildDawgIndex() { var reader = new CorpusZipReader <IEnumerable <string> >(tokenizedPath, tokenizedDataSerializer); var buildableIndex = new DawgBuildableIndex(); var indexBuilder = new IndexBuilder <string, IEnumerable <string> >(buildableIndex); indexBuilder.IndexCorpus(reader.Read()); var index = buildableIndex.Build(); using var file = File.Create(dawgIndexPath); index.Serialize(file); }