Skip to content

Commit

Permalink
More silliness
Browse files Browse the repository at this point in the history
  • Loading branch information
ericholscher committed Feb 9, 2024
1 parent 5cee93f commit b0b8b39
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions adserver/analyzer/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class BaseAnalyzerBackend:

"""Base class that all analyzers should extend."""

# CSS selectors to select the "main" content of the page
Expand Down Expand Up @@ -112,18 +111,18 @@ def analyze_response(self, resp):
Analyze an HTTP resp and return keywords/topics for the URL.
This will only be passed a successful resp (20x).
All resps should return a list of keywords even if that list is empty.
All responses should return a list of keywords even if that list is empty.
This needs to be defined by subclasses.
"""
raise NotImplementedError("Subclasses should define this.")

def embed_response(self, resp):
"""
Analyze an HTTP resp and return an embedding for the URL.
Analyze an HTTP response and return an embedding for the URL.
This will only be passed a successful resp (20x).
All resps should return a vector even if that list is empty.
This will only be passed a successful response (20x).
All responses should return a vector even if that list is empty.
"""
log.warning("No embedding configured for %s", self.__class__.__name__)
return []

0 comments on commit b0b8b39

Please sign in to comment.