Package cleo.search.util

Examples of cleo.search.util.TermsDedup


    elementStoreBootstrap.loadLine2(line2Dir);
    elementStoreBootstrap.loadLine3(line3Dir);
    elementStoreBootstrap.loadMedia(mediaDir);
   
    TermsScanner scanner = new TermsScanner(termsDir);
    scanner.scan(new CompositeTermsHandler().add(new TermsDedup()).add(elementStoreBootstrap));
    elementStore.sync();
   
    System.out.printf("Bootstrap done in %d ms%n", c.tick());
  }
View Full Code Here


    elementStoreBootstrap.loadLine2(line2Dir);
    elementStoreBootstrap.loadLine3(line3Dir);
    elementStoreBootstrap.loadMedia(mediaDir);
   
    TermsScanner scanner = new TermsScanner(termsDir);
    scanner.scan(new CompositeTermsHandler().add(new TermsDedup()).add(elementStoreBootstrap));
    elementStore.sync();
   
    System.out.printf("Bootstrap %s: %d ms%n", elementStoreName, c.tick());
   
    /**
 
View Full Code Here

* @since 02/17, 2011
*/
public class TestTermsHandler extends TestCase {

  public void testTermsDedup() throws Exception {
    TermsDedup dedup = new TermsDedup();
   
    int source = 0;
    String[] terms;
    String[] results;
    String[] expected;
   
    terms = new String[] { };
    results = dedup.handle(source, terms);
    assertTrue(Arrays.equals(terms, results));
   
    terms = new String[] { "ibm" };
    results = dedup.handle(source, terms);
    assertTrue(Arrays.equals(terms, results));
   
    terms = new String[] { "ibm", "global" };
    results = dedup.handle(source, terms);
    assertTrue(Arrays.equals(terms, results));
   
    expected = new String[] { "ibm", "global" };
    terms = new String[] { "ibm", "global", "ibm" };
    results = dedup.handle(source, terms);
    assertTrue(Arrays.equals(expected, results));
   
    expected = new String[] { "ibm" };
    terms = new String[] { "ibm", "ibm" };
    results = dedup.handle(source, terms);
    assertTrue(Arrays.equals(expected, results));
  }
View Full Code Here

TOP

Related Classes of cleo.search.util.TermsDedup

Copyright © 2018 www.massapicom. 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.