@Test public void testNoEvents() throws UIMAException { EntityGraphOptions options = EntityGraphOptions.builder().withEvents(false).build(); EntityGraphFactory factory = createfactory(options); JCas jCas = JCasFactory.createJCas(); JCasTestGraphUtil.populateJcas(jCas); Graph graph = factory.create(jCas); final GraphTraversalSource traversal = graph.traversal(); assertEquals(3, traversal.V().hasLabel(ENTITY).count().next().intValue()); assertEquals(0, traversal.V().hasLabel(EVENT).count().next().intValue()); assertEquals(0, traversal.E().hasLabel(PARTICIPANT_IN).count().next().intValue()); assertEquals(2, traversal.E().hasLabel(RELATION).count().next().intValue()); assertEquals(3, IteratorUtils.count(graph.vertices())); assertEquals(2, IteratorUtils.count(graph.edges())); }
public Graph create(JCas jCas) throws AnalysisEngineProcessException { Graph graph = createTransformGraph(options.isMultiValueProperties()); load(jCas, graph, graph.features()); return graph; }
EntityGraphFactory { public Graph create(JCas jCas) throws AnalysisEngineProcessException { Graph graph = createTransformGraph(options.isMultiValueProperties()); load(jCas, graph, graph.features()); return graph; } }
EntityGraphFactory { public Graph create(JCas jCas) throws AnalysisEngineProcessException { Graph graph = createTransformGraph(options.isMultiValueProperties()); load(jCas, graph, graph.features()); return graph; } EntityGraphFactory(final UimaMonitor monitor, EntityGraphOptions options); }
EntityGraphFactory { public Graph create(JCas jCas) throws AnalysisEngineProcessException { Graph graph = createTransformGraph(options.isMultiValueProperties()); load(jCas, graph, graph.features()); return graph; } EntityGraphFactory(final UimaMonitor monitor, EntityGraphOptions options); Graph create(JCas jCas); Graph create(JCas jCas, Features features); void load(JCas jCas, Graph graph, Features features); }
EntityGraphFactory { public Graph create(JCas jCas) throws AnalysisEngineProcessException { Graph graph = createTransformGraph(options.isMultiValueProperties()); load(jCas, graph, graph.features()); return graph; } EntityGraphFactory(final UimaMonitor monitor, EntityGraphOptions options); Graph create(JCas jCas); Graph create(JCas jCas, Features features); void load(JCas jCas, Graph graph, Features features); static final String MENTIONS_PROPERTY; static final String MOST_COMMON_VALUE; static final String LONGEST_VALUE; }