Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/charlesreid1/five-letter-words
/ functions
Functions
30 in github.com/charlesreid1/five-letter-words
⨍
Functions
30
◇
Types & classes
2
↓ 11 callers
Function
get_words
()
get_words.py:8
↓ 3 callers
Function
trie_search
(n, verbose=False)
tries.py:232
↓ 2 callers
Function
word2bitvector
Turns a five-letter word into a bit vector representing character coverage. Uses 26 letters by default.
letter_coverage.py:19
↓ 2 callers
Function
word2vec
(word)
euclidean_distance.py:22
↓ 1 callers
Method
_assemble
Recursive private method called by assemble().
tries.py:146
↓ 1 callers
Method
_bubble_up
Pre-order depth-first traversal starting at the leaf nodes and proceeding upwards.
tries.py:209
↓ 1 callers
Method
assemble
Assemble the trie from the set of words passed to the constructor.
tries.py:132
↓ 1 callers
Function
btsolution
Reconstruct the sequence of words that gives maximum coverage and minimum word count. Input: minimum word key (last word), minimum value (nu
letter_coverage.py:47
↓ 1 callers
Method
bubble_up
Do a depth-first traversal of the entire trytrietree, pruning as we go. This is a pre-order traversal, meaning we traverse chi
tries.py:197
↓ 1 callers
Function
euclidean_distance
(word1, word2)
euclidean_distance.py:13
↓ 1 callers
Function
gen_variations
Recursive backtracking method to assemble strings differing by +/-distance at each position
diff_by_n.py:13
↓ 1 callers
Function
get_all_variations
Return all possible words that differ from `word` by +/-distance in each index. This does not include `word` in the variations.
diff_by_n.py:28
↓ 1 callers
Method
get_node_from_prefix
Given a string prefix, return the node that represents the tail end of that sequence of letters in this trie. Return N
tries.py:104
↓ 1 callers
Method
get_prefix_from_node
Given a node in the trie, return the string prefix that would lead to that node.
tries.py:87
↓ 1 callers
Function
in_reverse_sorted_order
(word)
reverse_lexico.py:12
↓ 1 callers
Function
in_sorted_order
(word)
lexico.py:12
↓ 1 callers
Function
is_near_palindrome
(word,lo,hi)
near_palindromes.py:11
↓ 1 callers
Function
is_palindrome
(word)
palindromes.py:13
↓ 1 callers
Function
is_palindrome_pair
(word1,word2)
palindromes.py:20
↓ 1 callers
Function
l2norm
(vec1, vec2)
euclidean_distance.py:18
↓ 1 callers
Function
main
Find pairs of SGB word vectors that differ by +/-distance in each component. To do this, iterate through each word, generate th
diff_by_n.py:42
↓ 1 callers
Function
print_tuple
(e)
euclidean_distance.py:30
↓ 1 callers
Method
set_root
(self,root_letter)
tries.py:83
↓ 1 callers
Function
trie_table
Compute and print a table of number of words n versus number of perfect tries formed.
tries.py:269
Method
__init__
(self, letter, count=0)
tries.py:39
Method
__init__
(self,words)
tries.py:47
Method
__str__
(self)
tries.py:51
Method
_str_recursive
(runner,depth)
tries.py:56
Function
get_dummy_words
()
letter_coverage.py:66
Function
printbv
Pretty printing for boolean bit vector
letter_coverage.py:34