-
Notifications
You must be signed in to change notification settings - Fork 462
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
Add ability to parse raw text into docvectors on-the-fly for impact indexes #2122 #2148
Conversation
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.
I thought we were going to change type to Map<String, Int>
in places where it makes sense?
return this.analyzer; | ||
} | ||
|
||
/** |
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.
/** | |
/** |
cascade.add(new ScoreTiesAdjusterReranker()); | ||
} | ||
|
||
/** |
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.
fix indent, same as above.
Query query = generator.buildQuery(Constants.CONTENTS, q); | ||
String encodedQuery = encode_with_onnx(q); | ||
public Result[] search(Map<String, Integer> encoded_q, int k) throws IOException, OrtException { | ||
Map<String, Float> float_encoded_q = intToFloat(encoded_q); |
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.
I'm still not very happy with this... we get a Map<String, Integer>
... and then we covert to Map<String, Float>
... then it comes back as a flat String.
Should we be redesigning the QueryEncoder?
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.
just saw this. this line is not for query encoder thing, its for QueryGenerator to build query, which takes in float weight. so here I just convert Int to Float, for example 10 -> 10.0
…ap signature to compatible with python QueryEncoder until full integration
*/ | ||
public Result[] search(String q, int k) throws IOException, OrtException { | ||
// make encoded query from raw query | ||
Map<String, Integer> encoded_q = encode_with_onnx(q); |
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.
Same, camelCase?
#2122