@Test public void testIndexValues() throws IOException { ObjectStream<Event> eventStream = new SimpleEventStreamBuilder() .add("other/w=he;0.1 n1w=belongs;0.2 n2w=to;0.1 po=other;0.1" + " pow=other,He;0.1 powf=other,ic;0.1 ppo=other;0.1") .add("other/w=belongs;0.1 p1w=he;0.2 n1w=to;0.1 n2w=apache;0.1" + " po=other;0.1 pow=other,belongs;0.1 powf=other,lc;0.1 ppo=other;0.1") .add("other/w=to;0.1 p1w=belongs;0.2 p2w=he;0.1 n1w=apache;0.1" + " n2w=software;0.1 po=other;0.1 pow=other,to;0.1 powf=other,lc;0.1 ppo=other;0.1") .add("org-start/w=apache;0.1 p1w=to;0.2 p2w=belongs;0.1 n1w=software;0.1 n2w=foundation;0.1" + " po=other;0.1 pow=other,Apache;0.1 powf=other,ic;0.1 ppo=other;0.1") .add("org-cont/w=software;0.1 p1w=apache;0.2 p2w=to;0.1 n1w=foundation;0.1" + " n2w=.;0.1 po=org-start;0.1 pow=org-start,Software;0.1 powf=org-start,ic;0.1 ppo=other;0.1") .add("org-cont/w=foundation;0.1 p1w=software;0.2 p2w=apache;0.1 n1w=.;0.1 po=org-cont;0.1" + " pow=org-cont,Foundation;0.1 powf=org-cont,ic;0.1 ppo=org-start;0.1") .add("other/w=.;0.1 p1w=foundation;0.1 p2w=software;0.1 po=org-cont;0.1 pow=org-cont,.;0.1" + " powf=org-cont,other;0.1 ppo=org-cont;0.1") .build(); indexer.index(eventStream); System.out.println(indexer); Assert.assertEquals(3, indexer.getContexts().length); Assert.assertArrayEquals(new int[]{0}, indexer.getContexts()[0]); Assert.assertArrayEquals(new int[]{0}, indexer.getContexts()[1]); Assert.assertArrayEquals(new int[]{0}, indexer.getContexts()[2]); Assert.assertEquals(3, indexer.getValues().length); final float delta = 0.001F; Assert.assertArrayEquals(new float[]{0.1F, 0.2F, 0.1F, 0.1F, 0.1F, 0.1F, 0.1F}, indexer.getValues()[0], delta); Assert.assertArrayEquals(new float[]{0.1F, 0.2F, 0.1F, 0.1F, 0.1F, 0.1F, 0.1F, 0.1F, 0.1F}, indexer.getValues()[1], delta); Assert.assertArrayEquals(new float[]{0.1F, 0.2F, 0.1F, 0.1F, 0.1F, 0.1F, 0.1F, 0.1F, 0.1F}, indexer.getValues()[2], delta); Assert.assertEquals(5, indexer.getNumEvents()); Assert.assertArrayEquals(new int[]{0, 1, 2}, indexer.getOutcomeList()); Assert.assertArrayEquals(new int[]{3, 1, 1}, indexer.getNumTimesEventsSeen()); Assert.assertArrayEquals(new String[]{"ppo=other"}, indexer.getPredLabels()); Assert.assertArrayEquals(new String[]{"other", "org-start", "org-cont"}, indexer.getOutcomeLabels()); Assert.assertArrayEquals(new int[]{5}, indexer.getPredCounts()); }
public float[][] getValues() { return values; }
OnePassRealValueDataIndexer extends OnePassDataIndexer { public float[][] getValues() { return values; } }
OnePassRealValueDataIndexer extends OnePassDataIndexer { public float[][] getValues() { return values; } OnePassRealValueDataIndexer(); }
OnePassRealValueDataIndexer extends OnePassDataIndexer { public float[][] getValues() { return values; } OnePassRealValueDataIndexer(); float[][] getValues(); }
OnePassRealValueDataIndexer extends OnePassDataIndexer { public float[][] getValues() { return values; } OnePassRealValueDataIndexer(); float[][] getValues();  }