Skip to content

Commit

Permalink
Merge pull request stanford-oval#236 from zhoucheng89/main
Browse files Browse the repository at this point in the history
Fix SerperRM bug.
  • Loading branch information
shaoyijia authored Oct 27, 2024
2 parents f1af6d8 + c946f3c commit a06e0d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion knowledge_storm/rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ def forward(self, query_or_queries: Union[str, List[str]], exclude_urls: List[st
snippets = [organic.get("snippet")]
if self.ENABLE_EXTRA_SNIPPET_EXTRACTION:
snippets.extend(
valid_url_to_snippets.get(url, {}).get("snippets", [])
valid_url_to_snippets.get(url.strip("'"), {}).get(
"snippets", []
)
)
collected_results.append(
{
Expand Down

0 comments on commit a06e0d4

Please sign in to comment.