-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue #30 #99] Team3 regex trigram #100
Conversation
|
||
/** | ||
* | ||
* @return RegexInfo describing a regex that matching NO string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"that matching NO string" -> "that matches NO string"? What's "NO string"? Change it "NONE" with quotes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it means it won't match anything. It's for handling errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's better to add one more sentence to explain its meaning?
Equals implementation is changed to be based on hash code. And more test cases have been added. Please take a look and see if it's ready to be merged. |
private int gramLength; | ||
|
||
public GramBooleanQuery(QueryOp operator) { | ||
this(operator, 3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment: "Default gram length is 3".
} | ||
|
||
/** | ||
* This return a GramBooleanQuery's hash code. <br> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"return" -> "returns"
I left more comments for you. |
@chenlica New comments have been taken care of. Should we declare some classes and function as package-only like how RE2J does? So they can only be called within the regexMatch package. |
It will be good to do that. After you make these changes, I will review it. |
Some functions are changed to package-level. So only code inside regexMatch package can access them. |
OK. Are you blocked by this PR? I need to finish something tonight, and can review it tomorrow. |
Yes. After merging this into master, we can start the implementation. |
If you are blocked by this PR, you can create another branch of your branch team3-regex-trigram, then continue the development using that branch. After we finish this PR tomorrow, you can create a new PR from that branch to master. |
This PR looks good to me now. Please go ahead to do the merge! |
An initial skeleton of our translator, including:
RegexToTrigram.java, the main translator program
RegexInfo.java, a class containing info about emptyable, prefix, suffix, exact and match
TrigramBooleanQuery.java, which represents the boolean query tree
and a few initial test cases.
@chenlica