/// <summary> /// Initializes a new instance of the <see cref="pipelineLexicResourceResolverNode"/> class. /// </summary> public pipelineLexicResourceResolverNode(string resourceFilePath, string grammSpecFilename) { String resPath = appManager.Application.folder_resources.findFile(resourceFilePath, SearchOption.AllDirectories); String specPath = appManager.Application.folder_resources.findFile(grammSpecFilename, SearchOption.AllDirectories); parser = new multitextResourceParser(resPath, specPath); _nodeType = pipelineNodeTypeEnum.transformer; SetLabel(); }
/// <summary>Prepares the resolver to work with MULTITEXT v5 lexic resources</summary> /// <remarks><para>It will load grammar tag converter specification and lock on designated MULTITEXT lexic resource file</para></remarks> /// <param name="grammSpecFilename">Name of Excel file containing conversion specifications</param> /// <param name="multitextResource">Morphologic \\ lexic dictionary resource file annotated by MULTITEXT specification</param> /// <seealso cref="aceOperationSetExecutorBase"/> public void aceOperation_setupMultitext( [Description("Name of Excel file containing conversion specifications")] String grammSpecFilename = "sr_multitext_conversion.xlsx", [Description("Morphologic \\ lexic dictionary resource file annotated by MULTITEXT specification")] String multitextResource = "srLex_v1.2.mtx") { String specFilePath = appManager.Application.folder_resources.findFile(grammSpecFilename, SearchOption.AllDirectories); String resFilePath = appManager.Application.folder_resources.findFile(multitextResource, SearchOption.AllDirectories); if (specFilePath.isNullOrEmpty()) { response.AppendLine("Gramm conversion specification file [ " + grammSpecFilename + "not found in resources"); return; } if (resFilePath.isNullOrEmpty()) { response.AppendLine("Resource file [ " + multitextResource + " ] not found in resources"); return; } multitext = new multitextResourceParser(resFilePath, specFilePath, output); }