예제 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public org.maltparser.core.syntaxgraph.DependencyStructure parse(org.maltparser.core.syntaxgraph.DependencyStructure parseDependencyGraph) throws org.maltparser.core.exception.MaltChainedException
        public IDependencyStructure parse(IDependencyStructure parseDependencyGraph)
        {
            config.clear();
            config.DependencyGraph = parseDependencyGraph;
            config.initialize();

            while (!config.TerminalState)
            {
                GuideUserAction action = transitionSystem.getDeterministicAction(this, config);
                if (action == null)
                {
                    action = predict();
                }
                transitionSystem.apply(action, config);
            }
            parseDependencyGraph.LinkAllTreesToRoot();
            return(parseDependencyGraph);
        }