public SummaryStatistics(string metricName, string metricDescription, IMetricComputation baseMetricComputation, ComponentLogger logger) { m_metricComputation = baseMetricComputation; m_metricName = metricName; m_metricDescription = metricDescription; m_logger = logger; }
/// <summary> /// Builds the code source. /// Depending on metadata type final class will implement different interfaces and thus will have different class body. /// 1. metadata is a DecisionMetadata - the final source class is going to implement IDecisionModule interface, /// 2. metadata is a LoopScopeMetadata - the final source class is going to implement ILoopDecisionModule interface /// </summary> /// <param name="metadata">The metadata.</param> /// <param name="typeDirectories">The type directories.</param> /// <param name="successorNodeLabelIdLookup">The successor node label id lookup.</param> /// <param name="predeccessorsOutputsNameTypeLookup">The predeccessors outputs name type lookup.</param> /// <param name="logger">The logger.</param> /// <param name="assembliesReferenceLocations">Output the list of assemblies locations that must be reference by DecisionCompilator</param> /// <returns></returns> public static string BuildCodeSource(IDecision metadata, List<string> typeDirectories, Dictionary<string, string> successorNodeLabelIdLookup, Dictionary<string, string> predeccessorsOutputsNameTypeLookup, ComponentLogger logger, out HashSet<string> assembliesReferenceLocations) { string bodyCode, moduleInterface; if (metadata is DecisionMetadata) { //parse the code written by user DecisionCodeParser codeParser = new DecisionCodeParser(metadata.DecisionCode, successorNodeLabelIdLookup, predeccessorsOutputsNameTypeLookup); string userDecisionCodeSnippet = codeParser.ParseCode(); bodyCode = String.Format(DECISION_MODULE_BODY, userDecisionCodeSnippet); moduleInterface = typeof(IDecisionModule).FullName; } else { //append ';' to the end just in case so that user condition can be simplified string decisionCode = (metadata.DecisionCode.EndsWith(";")) ? metadata.DecisionCode : metadata.DecisionCode + ";"; DecisionCodeParser codeParser = new DecisionCodeParser(decisionCode, successorNodeLabelIdLookup, predeccessorsOutputsNameTypeLookup); string userDecisionCodeSnippet = codeParser.ParseCode(); bodyCode = String.Format(LOOP_DECISION_MODULE_BODY, userDecisionCodeSnippet); moduleInterface = typeof(ILoopDecisionModule).FullName; } //build the string of all usings of all namespace found in types assemblies string usingsNamespacesCodeSnippet = ReferenceTypesAssemblies(typeDirectories, logger, out assembliesReferenceLocations); return BuildDecisionCodeSource(metadata.Classname, moduleInterface, bodyCode, usingsNamespacesCodeSnippet); }
private static TLDictionaryIndex BuildDictionary(TLArtifactsCollection listOfArtifacts, ComponentLogger logger) { if (listOfArtifacts == null) { throw new ComponentException("Received null listOfArtifacts"); } TLDictionaryIndex dict = TFIDFIndexBuilder.build(listOfArtifacts, logger); return dict; }
public MetricComputationEngine(TLDatasetsList datasets, ComponentLogger logger, MetricComputationComponentConfig config) : base(datasets) { if (logger == null) { throw new ArgumentNullException("logger"); } m_logger = logger; InitMetricComputationsPerDataset(config); }
/// <summary> /// Destroys the logger. /// </summary> /// <param name="logger">The logger.</param> internal static void DestroyLogger(ComponentLogger logger) { ComponentLoggerImplementation loggerImpl = logger as ComponentLoggerImplementation; if (loggerImpl != null) { NLog.Config.LoggingRule loggingRule = TryFindRule(loggerImpl.Name); lock (lockLoggingRules) { NLog.LogManager.Configuration.LoggingRules.Remove(loggingRule); } } }
/// <summary> /// Loads the component based on the provided component metadata. /// </summary> /// <param name="logger">The logger - logger provided for the component.</param> public void Load(ComponentLogger logger) { if (LoadedComponent == null) { Assembly tlcompAssembly = Assembly.LoadFrom(m_metadata.ComponentMetadataDefinition.Assembly); Type myLoadClass = tlcompAssembly.GetType(m_metadata.ComponentMetadataDefinition.Classname); // LoadClass is my class if (myLoadClass == null) { throw new ComponentsLibraryException("Component class " + m_metadata.ComponentMetadataDefinition.Classname + " could not be loaded."); } LoadedComponent = (IComponent)Activator.CreateInstance(myLoadClass, new Object[] { logger }); //create workspace wrapper for the component IWorkspace workspaceWrapper = WorkspaceWrapperFactory.CreateWorkspaceWrapper(m_metadata, m_workspace); LoadedComponent.Workspace = workspaceWrapper; SetConfiguration(); } }
public SimilarityMatrixNullImporter(ComponentLogger log) : base(log) { }
public CamelCaseSplitterComponent(ComponentLogger log) : base(log) { _config = new CamelCaseSplitterComponentConfig(); Configuration = _config; }
public CoestArtifactsImporter(ComponentLogger log) : base(log) { m_config = new ImporterConfig(); Configuration = m_config; }
public TestEmptyComponent(ComponentLogger log) : base(log) { }
public AnswerMatrixXMLImporter(ComponentLogger log) : base(log) { _config = new AnswerMatrixXMLImporterConfig(); Configuration = _config; }
public TriplePCAComponent(ComponentLogger log) : base(log) { _config = new RConfig(); Configuration = _config; }
public OCSTIComponent(ComponentLogger log) : base(log) { }
public MatricesCollector(ComponentLogger log) : base(log) { }
public SimilaritiesImporter(ComponentLogger log) : base(log) { _config = new SimilarityMatrixImporterConfig(); Configuration = _config; }
public GetStringFromStringList(ComponentLogger log) : base(log) { }
public ArtifactsCollectionCSVExporter(ComponentLogger log) : base(log) { Config = new ArtifactsCollectionCSVExporterConfig(); Configuration = Config; }
public CSVSimilarityMatrixExporter(ComponentLogger log) : base(log) { Config = new CSVConfig(); Configuration = Config; }
public ResultsRetrievalComponent(ComponentLogger log) : base(log) { }
public NormalizationComponent(ComponentLogger log) : base(log) { }
public ExperimentalSetupComponent(ComponentLogger log, ExperimentalSetupConfig config) : base(log) { _config = config; Configuration = _config; }
public OracleImporter(ComponentLogger log, OracleImporterConfig config) : base(log) { _config = config; Configuration = _config; }
public TraceLabComponent1(ComponentLogger log) : base(log) { }
public OracleImporter(ComponentLogger log) : base(log) { _config = new OracleImporterConfig(); Configuration = _config; }
public SimpleResultsGUI(ComponentLogger log) : base(log) { _config = new SimpleResultsGUIConfig(); Configuration = _config; }
public DocumentVectorComponent(ComponentLogger log) : base(log) { _config = new DocumentVectorConfig(); Configuration = _config; }
protected override void CreateImporter(ComponentLogger logger) { TestComponent = new PreprocessorCleanUpComponent(logger); }
public DatasetGetter(ComponentLogger log) : base(log) { }
public ANCTracerComponent(ComponentLogger logger) : base(logger) { this.Configuration = new TracerConfig(); }
public ResultsControllerExporter(ComponentLogger log) : base(log) { _config = new ResultsControllerExporterConfig(); Configuration = _config; }
/// <summary> /// Builds the code source. /// Depending on metadata type final class will implement different interfaces and thus will have different class body. /// 1. metadata is a DecisionMetadata - the final source class is going to implement IDecisionModule interface, /// 2. metadata is a LoopScopeMetadata - the final source class is going to implement ILoopDecisionModule interface /// </summary> /// <param name="metadata">The metadata.</param> /// <param name="typeDirectories">The type directories.</param> /// <param name="successorNodeLabelIdLookup">The successor node label id lookup.</param> /// <param name="predeccessorsOutputsNameTypeLookup">The predeccessors outputs name type lookup.</param> /// <param name="logger">The logger.</param> /// <param name="assembliesReferenceLocations">Output the list of assemblies locations that must be reference by DecisionCompilator</param> /// <returns></returns> public static string BuildCodeSource(IDecision metadata, List <string> typeDirectories, Dictionary <string, string> successorNodeLabelIdLookup, Dictionary <string, string> predeccessorsOutputsNameTypeLookup, ComponentLogger logger, out HashSet <string> assembliesReferenceLocations) { string bodyCode, moduleInterface; if (metadata is DecisionMetadata) { //parse the code written by user DecisionCodeParser codeParser = new DecisionCodeParser(metadata.DecisionCode, successorNodeLabelIdLookup, predeccessorsOutputsNameTypeLookup); string userDecisionCodeSnippet = codeParser.ParseCode(); bodyCode = String.Format(DECISION_MODULE_BODY, userDecisionCodeSnippet); moduleInterface = typeof(IDecisionModule).FullName; } else { //append ';' to the end just in case so that user condition can be simplified string decisionCode = (metadata.DecisionCode.EndsWith(";")) ? metadata.DecisionCode : metadata.DecisionCode + ";"; DecisionCodeParser codeParser = new DecisionCodeParser(decisionCode, successorNodeLabelIdLookup, predeccessorsOutputsNameTypeLookup); string userDecisionCodeSnippet = codeParser.ParseCode(); bodyCode = String.Format(LOOP_DECISION_MODULE_BODY, userDecisionCodeSnippet); moduleInterface = typeof(ILoopDecisionModule).FullName; } //build the string of all usings of all namespace found in types assemblies string usingsNamespacesCodeSnippet = ReferenceTypesAssemblies(typeDirectories, logger, out assembliesReferenceLocations); return(BuildDecisionCodeSource(metadata.Classname, moduleInterface, bodyCode, usingsNamespacesCodeSnippet)); }
public CorpusImporter(ComponentLogger log, CorpusImporterConfig config) : base(log) { _config = config; Configuration = _config; }
public EffectivenessMetricsComponent(ComponentLogger log) : base(log) { _config = new EffectivenessMetricsConfig(); Configuration = _config; }
public PageRankComponent(ComponentLogger log) : base(log) { _config = new PageRankConfig(); Configuration = _config; }
public Incrementer(ComponentLogger log) : base(log) { }
public AffineTransformationLambdaComponent(ComponentLogger log) : base(log) { }
public VSMSmoothComponent(ComponentLogger log) : base(log) { }
public SemeruSplitterComponent(ComponentLogger log) : base(log) { _config = new SemeruSplitterComponentConfig(); Configuration = _config; }
public LinkExtractorMatrixComponent(ComponentLogger log) : base(log) { }
public ArtifactsImporter(ComponentLogger log, ArtifactsImporterConfig config) : base(log) { _config = config; Configuration = _config; }
public StringWriter(ComponentLogger log) : base(log) { config = new StringWriterConfig(); Configuration = config; }
public DatasetConverter(ComponentLogger log) : base(log) { }
public LambdaCalculationComponent(ComponentLogger log) : base(log) { }
public CorpusImporter(ComponentLogger log) : base(log) { _config = new CorpusImporterConfig(); Configuration = _config; }
public AveragePrecisionsMetricsComponent(ComponentLogger log) : base(log) { }
public CollectCorpusResults(ComponentLogger log) : base(log) { }
public ArtifactsDirectoryImporter(ComponentLogger log) : base(log) { _config = new ArtifactsDirectoryImporterConfig(); Configuration = _config; }
public JSDComponent(ComponentLogger log) : base(log) { }
public PreprocessorCleanUpComponent(ComponentLogger log) : base(log) { _config = new CleanupComponentConfig(); Configuration = _config; }
public CollectPCAResults(ComponentLogger log) : base(log) { }
public BoxplotConverter(ComponentLogger log) : base(log) { }
public POSExtractorComponent(ComponentLogger log) : base(log) { _config = new POSExtractorConfig(); Configuration = _config; }
public SimilarityMatrixCSVExporterWithCorrectness(ComponentLogger log) : base(log) { Config = new SimilarityMatrixCSVExporterWithCorrectnessConfig(); Configuration = Config; }