Giter Site home page Giter Site logo

wikiindexer's People

Contributors

nicklondhe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wikiindexer's Issues

Bug in TokenStreamTest

  1.  //same token repeated
    stream = new TokenStream("hello");
    stream.append("hello","hello","hello","helllo");
    assertEquals(0, stream.query("test"));
    assertEquals(5, stream.query("hello"));
    stream = null;
    

    in line 177 line of the origin file. I think the there is a typo on the third line. Should the helllo be hello?

  2.  for (int i = 0; i < 4; i++)
        stream1.mergeWithNext();
    

    on line 883. here is refered as (1)

    //with merge with previous
    stream = new TokenStream("this");
    stream.append("is", "a", "test", "string");
    stream.next();
    stream.mergeWithPrevious();
    assertEquals(0, stream.query("this"));
    assertEquals(1, stream.query("this is"));
    stream = null;
    

    on line 199. here is refered as (2)

    //with merge with next
    stream = new TokenStream("this");
    stream.append("is", "a", "test", "string");
    stream.mergeWithNext();
    assertEquals(0, stream.query("this"));
    assertEquals(1, stream.query("this is"));
    stream = null;
    

    on line 208. here is refered as (3)

    I'm not quite sure about whether here is a bug. But at code (1), the pointer of the tokenstream is before the first element. here we can only merge the following two elements. But at code (2)and (3), the test cast require us to merge the elements around the pointer(since pointer in between "this" and "is"). I think here is a conflict on the behaviour of the function.

Bug in TokenStreamTest

//same token repeated
stream = new TokenStream("hello");
stream.append("hello","hello","hello","helllo");
assertEquals(0, stream.query("test"));
assertEquals(5, stream.query("hello"));
stream = null;

The last appended word is misspelled as "helllo" instead of "hello" and the test case fails.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.