Skip to content
Snippets Groups Projects
Commit 422f5f77 authored by “Daniel Griffiths”'s avatar “Daniel Griffiths”
Browse files

fix: added default values to class variables

parent c7603136
No related branches found
No related tags found
No related merge requests found
...@@ -4,11 +4,13 @@ from semantic_router.encoders import BaseEncoder ...@@ -4,11 +4,13 @@ from semantic_router.encoders import BaseEncoder
from semantic_router.route import Route from semantic_router.route import Route
from numpy.linalg import norm from numpy.linalg import norm
import string import string
from typing import Dict
from numpy import ndarray
class TfidfEncoder(BaseEncoder): class TfidfEncoder(BaseEncoder):
idf: np.ndarray idf: ndarray = np.array([])
word_index: dict word_index: Dict = {}
def __init__(self, name: str = "tfidf"): def __init__(self, name: str = "tfidf"):
super().__init__(name=name) super().__init__(name=name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment