[Issue #30 #99] Team3 regex trigram#100
Conversation
|
|
||
| /** | ||
| * | ||
| * @return RegexInfo describing a regex that matching NO string |
There was a problem hiding this comment.
"that matching NO string" -> "that matches NO string"? What's "NO string"? Change it "NONE" with quotes?
There was a problem hiding this comment.
it means it won't match anything. It's for handling errors.
There was a problem hiding this comment.
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.
Add a comment: "Default gram length is 3".
| } | ||
|
|
||
| /** | ||
| * This return a GramBooleanQuery's hash code. <br> |
|
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! |
### What changes were proposed in this PR? Add an `emergency` label fast-path to Auto Queue. A PR with this label is bumped before any non-emergency PR regardless of CREATED_AT, and its presence in BEHIND bypasses the in-flight guard so a non-emergency PR's running CI doesn't delay the bump. Within each priority class CREATED_AT-ASC ordering is preserved. Eligibility gates (auto-merge / not draft / not conflicting / APPROVED / threads resolved) still apply — this only reorders the bump, it does not bypass review. Label name is set by the `EMERGENCY_LABEL` constant (one-line change if `priority/P0` or similar is preferred later). ### Any related issues, documentation, discussions? Builds on #4672, #4678, #4845. ### How was this PR tested? `yaml.safe_load` parses; `node --check` parses the wrapped script body. Unit test on the partition logic: `[#100 docs, #101 emergency, #102 plain, #103 emergency+fix]` → `[101, 103, 100, 102]`. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7, 1M context) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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