Skip to content

Commit

Permalink
Adding a note to self.
Browse files Browse the repository at this point in the history
  • Loading branch information
AG committed Mar 2, 2024
1 parent bae361d commit 1466401
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ def _slugify(text):

# Define a function to update the trie structure with predictive words
def update_trie(trie, predictive_words):
# TODO: The words are usually not directly in the array. They're usually inside their own array so
# I don't think these lookups are finding common parents under the grandparent.
# This is probably harming the flexibility of branch traversals and making the dict larger
# than it needs to be.
for word in predictive_words:
if word not in trie:
trie[word] = {}
Expand Down

0 comments on commit 1466401

Please sign in to comment.