//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public boolean predict(org.maltparser.core.feature.FeatureModel featureModel, org.maltparser.parser.history.action.GuideDecision decision) throws org.maltparser.core.exception.MaltChainedException
        public virtual bool predict(FeatureModel featureModel, GuideDecision decision)
        {
            if (decision is SingleDecision)
            {
                throw new GuideException("A sequantial decision model expect a sequence of decisions, not a single decision. ");
            }
            featureModel.update();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.maltparser.parser.history.action.SingleDecision singleDecision = ((org.maltparser.parser.history.action.MultipleDecision)decision).getSingleDecision(decisionIndex);
            SingleDecision singleDecision = ((MultipleDecision)decision).getSingleDecision(decisionIndex);

            if (instanceModel == null)
            {
                initInstanceModel(featureModel, singleDecision.TableContainer.TableContainerName);
            }

            bool success = instanceModel.predict(featureModel.getFeatureVector(branchedDecisionSymbols, singleDecision.TableContainer.TableContainerName), singleDecision);

            if (singleDecision.continueWithNextDecision() && decisionIndex + 1 < decision.numberOfDecisions())
            {
                if (nextDecisionModel == null)
                {
                    initNextDecisionModel(((MultipleDecision)decision).getSingleDecision(decisionIndex + 1), branchedDecisionSymbols);
                }
                success = nextDecisionModel.predict(featureModel, decision) && success;
            }
            return(success);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public boolean predict(org.maltparser.core.feature.FeatureModel featureModel, org.maltparser.parser.history.action.GuideDecision decision) throws org.maltparser.core.exception.MaltChainedException
        public virtual bool predict(FeatureModel featureModel, GuideDecision decision)
        {
            featureModel.update();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.maltparser.parser.history.action.SingleDecision singleDecision = ((org.maltparser.parser.history.action.MultipleDecision)decision).getSingleDecision(decisionIndex);
            SingleDecision singleDecision = ((MultipleDecision)decision).getSingleDecision(decisionIndex);

            if (instanceModel == null)
            {
                initInstanceModel(featureModel, singleDecision.TableContainer.TableContainerName);
            }
            instanceModel.predict(featureModel.getFeatureVector(branchedDecisionSymbols, singleDecision.TableContainer.TableContainerName), singleDecision);
            if (decisionIndex + 1 < decision.numberOfDecisions())
            {
                if (singleDecision.continueWithNextDecision())
                {
                    DecisionModel child = children[singleDecision.DecisionCode];
                    if (child == null)
                    {
                        child = initChildDecisionModel(((MultipleDecision)decision).getSingleDecision(decisionIndex + 1), branchedDecisionSymbols + (branchedDecisionSymbols.Length == 0?"":"_") + singleDecision.DecisionSymbol);
                        children[singleDecision.DecisionCode] = child;
                    }
                    child.predict(featureModel, decision);
                }
            }

            return(true);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public boolean predict(org.maltparser.core.feature.FeatureModel featureModel, org.maltparser.parser.history.action.GuideDecision decision) throws org.maltparser.core.exception.MaltChainedException
        public virtual bool predict(FeatureModel featureModel, GuideDecision decision)
        {
            featureModel.update();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.maltparser.parser.history.action.SingleDecision singleDecision = (decision instanceof org.maltparser.parser.history.action.SingleDecision)?(org.maltparser.parser.history.action.SingleDecision)decision:((org.maltparser.parser.history.action.MultipleDecision)decision).getSingleDecision(decisionIndex);
            SingleDecision singleDecision = (decision is SingleDecision)?(SingleDecision)decision:((MultipleDecision)decision).getSingleDecision(decisionIndex);

            if (instanceModel == null)
            {
                initInstanceModel(featureModel, singleDecision.TableContainer.TableContainerName);
            }
            return(instanceModel.predict(featureModel.getFeatureVector(branchedDecisionSymbols, singleDecision.TableContainer.TableContainerName), singleDecision));
        }