Search in sources :

Example 6 with TransducerGraph

use of edu.stanford.nlp.fsm.TransducerGraph in project CoreNLP by stanfordnlp.

the class GrammarCompactor method getGraphFromMap.

protected static TransducerGraph getGraphFromMap(Map<String, TransducerGraph> m, String o) {
    TransducerGraph graph = m.get(o);
    if (graph == null) {
        graph = new TransducerGraph();
        graph.setEndNode(o);
        m.put(o, graph);
    }
    return graph;
}
Also used : TransducerGraph(edu.stanford.nlp.fsm.TransducerGraph)

Aggregations

TransducerGraph (edu.stanford.nlp.fsm.TransducerGraph)6 Arc (edu.stanford.nlp.fsm.TransducerGraph.Arc)1 ClassicCounter (edu.stanford.nlp.stats.ClassicCounter)1 Pair (edu.stanford.nlp.util.Pair)1 Triple (edu.stanford.nlp.util.Triple)1 Entry (java.util.Map.Entry)1