public static List <ClassificationModel> ConvertToClassificationModels(List <ArticleModel> articles, string category, List <string> stoplist) { ArticlesHandler articlesHandler = new ArticlesHandler(); List <ClassificationModel> temp = new List <ClassificationModel>(); foreach (var articleModel in articles) { temp.Add(new ClassificationModel() { StemmedWords = ArticlesHandler.GetStemmedAndStoplistedWords(articleModel, stoplist), Tag = articleModel.Categories[category].First() }); } return(temp); }
public PsaMovesetHandler(PsaFile psaFile) { PsaFile = psaFile; AttributesHandler = new AttributesParser(PsaFile); DataTableHandler = new DataTableHandler(PsaFile); ExternalDataHandler = new ExternalDataHandler(PsaFile); int dataSectionLocation = DataTableHandler.GetDataTableEntryByName("data").Location; string movesetBaseName = GetMovesetBaseName(); int numberOfSpecialActions = (PsaFile.DataSection[dataSectionLocation + 10] - PsaFile.DataSection[dataSectionLocation + 9]) / 4; int codeBlockDataStartLocation = 2014 + numberOfSpecialActions * 2; PsaCommandHandler psaCommandHandler = new PsaCommandHandler(psaFile, dataSectionLocation, codeBlockDataStartLocation); CodeBlocksHandler codeBlocksHandler = new CodeBlocksHandler(psaFile, dataSectionLocation, psaCommandHandler); ActionsHandler = new ActionsHandler(PsaFile, dataSectionLocation, codeBlocksHandler, psaCommandHandler); SubActionsHandler = new SubActionsHandler(PsaFile, dataSectionLocation, codeBlocksHandler, psaCommandHandler); SubRoutinesHandler = new SubRoutinesHandler(PsaFile, dataSectionLocation, ActionsHandler, SubActionsHandler, psaCommandHandler); ActionOverridesHandler = new ActionOverridesHandler(PsaFile, dataSectionLocation, ActionsHandler, psaCommandHandler); ArticlesHandler = new ArticlesHandler(PsaFile, dataSectionLocation, movesetBaseName, psaCommandHandler); CharacterParamsHandler = new CharacterParamsHandler(PsaFile, dataSectionLocation, movesetBaseName, psaCommandHandler); MiscHandler = new MiscHandler(PsaFile, dataSectionLocation, movesetBaseName, numberOfSpecialActions); }