Package edu.umd.cloud9.webgraph.data

Examples of edu.umd.cloud9.webgraph.data.AnchorText.addDocument()


    AnchorText anchor1 = new AnchorText(AnchorTextConstants.Type.EXTERNAL_OUT_LINK.val, "text", 1);
   
    AnchorText anchor2 = anchor1.clone();
    anchor2.setText("some text");
    assertTrue(anchor2.equals(anchor1));
    anchor2.addDocument(2);
    assertNull(anchor2.getText());
    assertEquals(anchor2.getSize(), 2);
    assertTrue(anchor2.equalsIgnoreSources(anchor1));
   
    AnchorText anchor3 = new AnchorText(AnchorTextConstants.Type.DOCNO_FIELD.val, "text");
View Full Code Here


    assertEquals(anchor2.getSize(), 2);
    assertTrue(anchor2.equalsIgnoreSources(anchor1));
   
    AnchorText anchor3 = new AnchorText(AnchorTextConstants.Type.DOCNO_FIELD.val, "text");
    anchor3.addDocumentsFrom(anchor2);
    anchor3.addDocument(2);
    assertNull(anchor3.getText());
    assertEquals(anchor3.getSize(), 2);
   
    anchor3.setWeight(1);
    assertEquals(anchor3.getWeight(), 0, 1e-100);
View Full Code Here

  }
 
  @Test
  public void testIterable() {
    AnchorText anchor = new AnchorText(AnchorTextConstants.Type.EXTERNAL_IN_LINK.val, "text");
    anchor.addDocument(1);
    anchor.addDocument(2);
    anchor.addDocument(3);
   
    int[] sources = anchor.getDocuments();
   
View Full Code Here

 
  @Test
  public void testIterable() {
    AnchorText anchor = new AnchorText(AnchorTextConstants.Type.EXTERNAL_IN_LINK.val, "text");
    anchor.addDocument(1);
    anchor.addDocument(2);
    anchor.addDocument(3);
   
    int[] sources = anchor.getDocuments();
   
    assertEquals(sources[0], 1);
View Full Code Here

  @Test
  public void testIterable() {
    AnchorText anchor = new AnchorText(AnchorTextConstants.Type.EXTERNAL_IN_LINK.val, "text");
    anchor.addDocument(1);
    anchor.addDocument(2);
    anchor.addDocument(3);
   
    int[] sources = anchor.getDocuments();
   
    assertEquals(sources[0], 1);
    assertEquals(sources[1], 2);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.