//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public DeterministicParser(DependencyParserConfig manager, org.maltparser.core.symbol.SymbolTableHandler symbolTableHandler) throws org.maltparser.core.exception.MaltChainedException
        public DeterministicParser(IDependencyParserConfig manager, SymbolTableHandler symbolTableHandler) : base(manager, symbolTableHandler)
        {
            registry.Algorithm = this;
            Guide = new SingleGuide(this, ClassifierGuide_GuideMode.CLASSIFY);
            string featureModelFileName = manager.getOptionValue("guide", "features").ToString().Trim();

            if (manager.LoggerInfoEnabled)
            {
                manager.logDebugMessage("  Feature model        : " + featureModelFileName + "\n");
                manager.logDebugMessage("  Classifier           : " + manager.getOptionValueString("guide", "learner") + "\n");
            }
            string dataSplitColumn    = manager.getOptionValue("guide", "data_split_column").ToString().Trim();
            string dataSplitStructure = manager.getOptionValue("guide", "data_split_structure").ToString().Trim();

            featureModel = manager.FeatureModelManager.getFeatureModel(SingleGuide.findURL(featureModelFileName, manager), 0, ParserRegistry, dataSplitColumn, dataSplitStructure);
        }
Beispiel #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void noMoreInstances() throws org.maltparser.core.exception.MaltChainedException
        public virtual void noMoreInstances()
        {
            if (decisionModel != null)
            {
                decisionModel.noMoreInstances(featureModel2);
            }
            else
            {
                configuration.logDebugMessage("The guide cannot create any models because there is no decision model. ");
            }
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public BatchTrainerWithDiagnostics(DependencyParserConfig manager, org.maltparser.core.symbol.SymbolTableHandler symbolTableHandler) throws org.maltparser.core.exception.MaltChainedException
        public BatchTrainerWithDiagnostics(IDependencyParserConfig manager, SymbolTableHandler symbolTableHandler) : base(manager, symbolTableHandler)
        {
            diagnostics        = new Diagnostics(manager.getOptionValue("singlemalt", "diafile").ToString());
            registry.Algorithm = this;
            Guide = new SingleGuide(this, ClassifierGuide_GuideMode.BATCH);
            string featureModelFileName = manager.getOptionValue("guide", "features").ToString().Trim();

            if (manager.LoggerInfoEnabled)
            {
                manager.logDebugMessage("  Feature model        : " + featureModelFileName + "\n");
                manager.logDebugMessage("  Learner              : " + manager.getOptionValueString("guide", "learner").ToString() + "\n");
            }
            string dataSplitColumn    = manager.getOptionValue("guide", "data_split_column").ToString().Trim();
            string dataSplitStructure = manager.getOptionValue("guide", "data_split_structure").ToString().Trim();

            featureModel = manager.FeatureModelManager.getFeatureModel(SingleGuide.findURL(featureModelFileName, manager), 0, ParserRegistry, dataSplitColumn, dataSplitStructure);

            manager.writeInfoToConfigFile("\nFEATURE MODEL\n");
            manager.writeInfoToConfigFile(featureModel.ToString());
            oracleGuide = parserState.Factory.makeOracleGuide(parserState.History);
        }