コード例 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private org.maltparser.parser.history.action.GuideUserAction predict() throws org.maltparser.core.exception.MaltChainedException
        private GuideUserAction predict()
        {
            currentAction.clear();
            try
            {
                manager.DecisionModel.predict(featureModel, currentAction, true);

                while (!transitionSystem.permissible(currentAction, config))
                {
                    if (manager.DecisionModel.predictFromKBestList(featureModel, currentAction) == false)
                    {
                        GuideUserAction   defaultAction    = transitionSystem.defaultAction(this, config);
                        ActionContainer[] actionContainers = ActionContainerArray;
                        defaultAction.getAction(actionContainers);
                        currentAction.addAction(actionContainers);
                        break;
                    }
                }
            }
            catch (System.NullReferenceException e)
            {
                throw new MaltChainedException("The guide cannot be found. ", e);
            }
            return(currentAction);
        }