Skip to content
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

Merged
merged 7 commits into from
Aug 8, 2023

Conversation

AileenLin
Copy link
Member

@AileenLin AileenLin requested a review from lintool July 16, 2023 17:34
Copy link
Member

@lintool lintool left a 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;
}

/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/**
/**

cascade.add(new ScoreTiesAdjusterReranker());
}

/**
Copy link
Member

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);
Copy link
Member

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?

Copy link
Member Author

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same, camelCase?

@lintool lintool merged commit 9cdcf0e into castorini:master Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants